mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -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}
|
||||
children]])])))
|
||||
|
||||
(mf/defc menu-separator
|
||||
[]
|
||||
[:li {:class (stl/css :separator)}])
|
||||
|
||||
(mf/defc context-menu-tree
|
||||
[context-data]
|
||||
(let [entries (generate-menu-entries context-data)]
|
||||
(for [[index {:keys [title action selected? submenu] :as entry}] (d/enumerate entries)]
|
||||
[:* {:key (str title " " index)}
|
||||
(cond
|
||||
(= :separator entry) [:& menu-separator]
|
||||
(= :separator entry) [:li {:class (stl/css :separator)}]
|
||||
submenu [:& menu-entry {:title title}
|
||||
[:& context-menu-tree (assoc context-data :type submenu)]]
|
||||
:else [:& menu-entry
|
||||
|
|
Loading…
Reference in a new issue