0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Inline separator

This commit is contained in:
Florian Schroedl 2024-07-24 10:59:26 +02:00
parent 08cc777096
commit fbd2ab833d

View file

@ -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