0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-23 23:35:58 -05:00

Use new component definition convention for token-component

This commit is contained in:
Andrey Antukh 2025-02-04 18:15:23 +01:00
parent 769000da2d
commit 1f450c83ec

View file

@ -72,7 +72,8 @@
:shape-ids shape-ids
:selected-pred #(seq (% ids-by-attributes))}))
(mf/defc token-component
(mf/defc token-component*
{::mf/private true}
[{:keys [type tokens selected-shapes token-type-props active-theme-tokens]}]
(let [open? (mf/deref (-> (l/key type)
(l/derived lens:token-type-open-status)))
@ -289,12 +290,12 @@
(for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)
(:empty token-groups))]
[:& token-component {:key token-key
:type token-key
:selected-shapes selected-shapes
:active-theme-tokens active-theme-tokens
:tokens tokens
:token-type-props token-type-props}])]))
[:> token-component* {:key token-key
:type token-key
:selected-shapes selected-shapes
:active-theme-tokens active-theme-tokens
:tokens tokens
:token-type-props token-type-props}])]))
(mf/defc import-export-button
{::mf/wrap-props false}