mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
♻️ Remove anonym fn
This commit is contained in:
parent
325a78a967
commit
41c8bba1df
1 changed files with 24 additions and 21 deletions
|
@ -47,29 +47,32 @@
|
||||||
:class (stl/css-case :check-icon true
|
:class (stl/css-case :check-icon true
|
||||||
:check-icon-visible selected?)}]])]))
|
:check-icon-visible selected?)}]])]))
|
||||||
|
|
||||||
|
(defn- open-tokens-theme-modal
|
||||||
|
[]
|
||||||
|
(modal/show! :tokens/themes {}))
|
||||||
|
|
||||||
(mf/defc theme-options
|
(mf/defc theme-options
|
||||||
[{:keys [active-theme-paths themes on-close]}]
|
[{:keys [active-theme-paths themes on-close]}]
|
||||||
(let [on-edit-click #(modal/show! :tokens/themes {})]
|
[:ul {:class (stl/css :theme-options :custom-select-dropdown)
|
||||||
[:ul {:class (stl/css :theme-options :custom-select-dropdown)
|
:role "listbox"}
|
||||||
:role "listbox"}
|
(for [[group themes] themes]
|
||||||
(for [[group themes] themes]
|
[:li {:key group
|
||||||
[:li {:key group
|
:aria-labelledby (dm/str group "-label")
|
||||||
:aria-labelledby (dm/str group "-label")
|
:role "group"}
|
||||||
:role "group"}
|
(when (seq group)
|
||||||
(when (seq group)
|
[:> text* {:as "span" :typography "headline-small" :class (stl/css :group) :id (dm/str (str/kebab group) "-label") :title group} group])
|
||||||
[:> text* {:as "span" :typography "headline-small" :class (stl/css :group) :id (dm/str (str/kebab group) "-label") :title group} group])
|
[:& themes-list {:themes themes
|
||||||
[:& themes-list {:themes themes
|
:active-theme-paths active-theme-paths
|
||||||
:active-theme-paths active-theme-paths
|
:on-close on-close
|
||||||
:on-close on-close
|
:grouped? true}]])
|
||||||
:grouped? true}]])
|
[:li {:class (stl/css :separator)
|
||||||
[:li {:class (stl/css :separator)
|
:aria-hidden true}]
|
||||||
:aria-hidden true}]
|
[:li {:class (stl/css-case :checked-element true
|
||||||
[:li {:class (stl/css-case :checked-element true
|
:checked-element-button true)
|
||||||
:checked-element-button true)
|
:role "option"
|
||||||
:role "option"
|
:on-click open-tokens-theme-modal}
|
||||||
:on-click on-edit-click}
|
[:> text* {:as "span" :typography "body-small"} (tr "workspace.tokens.edit-themes")]
|
||||||
[:> text* {:as "span" :typography "body-small"} (tr "workspace.tokens.edit-themes")]
|
[:> icon* {:icon-id i/arrow-right :aria-hidden true}]]])
|
||||||
[:> icon* {:icon-id i/arrow-right :aria-hidden true}]]]))
|
|
||||||
|
|
||||||
(mf/defc theme-select
|
(mf/defc theme-select
|
||||||
[{:keys []}]
|
[{:keys []}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue