0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -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 :input-props {:ref group-input-ref
:default-value (:group theme) :default-value (:group theme)
:on-change on-update-group} :on-change on-update-group}
:render-right (mf/fnc [] :render-right (when (seq theme-groups)
(mf/fnc []
[:button {:class (stl/css :group-drop-down-button) [:button {:class (stl/css :group-drop-down-button)
:type "button" :type "button"
:on-click (fn [e] :on-click (fn [e]
(dom/stop-propagation e) (dom/stop-propagation e)
(on-toggle-dropdown))} (on-toggle-dropdown))}
i/arrow])}]] i/arrow]))}]]
[:& labeled-input {:label "Theme" [:& labeled-input {:label "Theme"
:input-props {:default-value (:name theme) :input-props {:default-value (:name theme)
:on-change on-update-name}}]] :on-change on-update-name}}]]