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

Show dropdown only when groups exist

This commit is contained in:
Florian Schroedl 2024-09-10 15:42:44 +02:00
parent 21f42021d8
commit 281b801112

View file

@ -171,13 +171,14 @@
:input-props {:ref group-input-ref
:default-value (:group theme)
:on-change on-update-group}
:render-right (mf/fnc []
[:button {:class (stl/css :group-drop-down-button)
:type "button"
:on-click (fn [e]
(dom/stop-propagation e)
(on-toggle-dropdown))}
i/arrow])}]]
:render-right (when (seq theme-groups)
(mf/fnc []
[:button {:class (stl/css :group-drop-down-button)
:type "button"
:on-click (fn [e]
(dom/stop-propagation e)
(on-toggle-dropdown))}
i/arrow]))}]]
[:& labeled-input {:label "Theme"
:input-props {:default-value (:name theme)
:on-change on-update-name}}]]