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:
parent
4e1353caf1
commit
0f50afc4c3
2 changed files with 12 additions and 2 deletions
|
@ -246,7 +246,7 @@
|
|||
|
||||
(mf/defc layout-item-menu
|
||||
{::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))
|
||||
selection-parents (mf/deref selection-parents-ref)
|
||||
|
@ -268,9 +268,15 @@
|
|||
|
||||
title
|
||||
(cond
|
||||
(and is-layout-container? (not is-layout-child?))
|
||||
(and is-layout-container? (not is-layout-child?) is-flex-layout?)
|
||||
"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?
|
||||
"Flex element"
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
is-grid-parent? (mf/deref is-grid-parent-ref)
|
||||
|
||||
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)
|
||||
|
||||
ids (hooks/use-equal-memo ids)
|
||||
|
@ -83,6 +85,8 @@
|
|||
:values layout-item-values
|
||||
:is-flex-parent? is-flex-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-container? is-layout-container?
|
||||
:shape shape}])
|
||||
|
|
Loading…
Add table
Reference in a new issue