0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 00:01:51 -05:00

🐛 Fix typo when grid board selected

This commit is contained in:
alonso.torres 2024-02-07 17:34:22 +01:00 committed by Andrés Moya
parent 4e1353caf1
commit 0f50afc4c3
2 changed files with 12 additions and 2 deletions

View file

@ -246,7 +246,7 @@
(mf/defc layout-item-menu (mf/defc layout-item-menu
{::mf/wrap [#(mf/memo' % (mf/check-props ["ids" "values" "type" "is-layout-child?" "is-grid-parent?" "is-flex-parent?"]))]} {::mf/wrap [#(mf/memo' % (mf/check-props ["ids" "values" "type" "is-layout-child?" "is-grid-parent?" "is-flex-parent?"]))]}
[{:keys [ids values is-layout-child? is-layout-container? is-grid-parent? is-flex-parent?] :as props}] [{:keys [ids values is-layout-child? is-layout-container? is-grid-parent? is-flex-parent? is-flex-layout? is-grid-layout?] :as props}]
(let [selection-parents-ref (mf/use-memo (mf/deps ids) #(refs/parents-by-ids ids)) (let [selection-parents-ref (mf/use-memo (mf/deps ids) #(refs/parents-by-ids ids))
selection-parents (mf/deref selection-parents-ref) selection-parents (mf/deref selection-parents-ref)
@ -268,9 +268,15 @@
title title
(cond (cond
(and is-layout-container? (not is-layout-child?)) (and is-layout-container? (not is-layout-child?) is-flex-layout?)
"Flex board" "Flex board"
(and is-layout-container? (not is-layout-child?) is-grid-layout?)
"Grid board"
(and is-layout-container? (not is-layout-child?))
"Layout board"
is-flex-parent? is-flex-parent?
"Flex element" "Flex element"

View file

@ -49,6 +49,8 @@
is-grid-parent? (mf/deref is-grid-parent-ref) is-grid-parent? (mf/deref is-grid-parent-ref)
is-layout-container? (ctl/any-layout? shape) is-layout-container? (ctl/any-layout? shape)
is-flex-layout? (ctl/flex-layout? shape)
is-grid-layout? (ctl/grid-layout? shape)
is-layout-child-absolute? (ctl/item-absolute? shape) is-layout-child-absolute? (ctl/item-absolute? shape)
ids (hooks/use-equal-memo ids) ids (hooks/use-equal-memo ids)
@ -83,6 +85,8 @@
:values layout-item-values :values layout-item-values
:is-flex-parent? is-flex-parent? :is-flex-parent? is-flex-parent?
:is-grid-parent? is-grid-parent? :is-grid-parent? is-grid-parent?
:is-flex-layout? is-flex-layout?
:is-grid-layout? is-grid-layout?
:is-layout-child? is-layout-child? :is-layout-child? is-layout-child?
:is-layout-container? is-layout-container? :is-layout-container? is-layout-container?
:shape shape}]) :shape shape}])