mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -05:00
Inline separator
This commit is contained in:
parent
08cc777096
commit
fbd2ab833d
1 changed files with 1 additions and 5 deletions
|
@ -475,17 +475,13 @@
|
||||||
:on-context-menu prevent-default}
|
:on-context-menu prevent-default}
|
||||||
children]])])))
|
children]])])))
|
||||||
|
|
||||||
(mf/defc menu-separator
|
|
||||||
[]
|
|
||||||
[:li {:class (stl/css :separator)}])
|
|
||||||
|
|
||||||
(mf/defc context-menu-tree
|
(mf/defc context-menu-tree
|
||||||
[context-data]
|
[context-data]
|
||||||
(let [entries (generate-menu-entries context-data)]
|
(let [entries (generate-menu-entries context-data)]
|
||||||
(for [[index {:keys [title action selected? submenu] :as entry}] (d/enumerate entries)]
|
(for [[index {:keys [title action selected? submenu] :as entry}] (d/enumerate entries)]
|
||||||
[:* {:key (str title " " index)}
|
[:* {:key (str title " " index)}
|
||||||
(cond
|
(cond
|
||||||
(= :separator entry) [:& menu-separator]
|
(= :separator entry) [:li {:class (stl/css :separator)}]
|
||||||
submenu [:& menu-entry {:title title}
|
submenu [:& menu-entry {:title title}
|
||||||
[:& context-menu-tree (assoc context-data :type submenu)]]
|
[:& context-menu-tree (assoc context-data :type submenu)]]
|
||||||
:else [:& menu-entry
|
:else [:& menu-entry
|
||||||
|
|
Loading…
Add table
Reference in a new issue