mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 04:42:59 +02:00
⚡ Use new component definition convention for token-component
This commit is contained in:
parent
769000da2d
commit
1f450c83ec
1 changed files with 8 additions and 7 deletions
|
@ -72,7 +72,8 @@
|
||||||
:shape-ids shape-ids
|
:shape-ids shape-ids
|
||||||
:selected-pred #(seq (% ids-by-attributes))}))
|
: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]}]
|
[{:keys [type tokens selected-shapes token-type-props active-theme-tokens]}]
|
||||||
(let [open? (mf/deref (-> (l/key type)
|
(let [open? (mf/deref (-> (l/key type)
|
||||||
(l/derived lens:token-type-open-status)))
|
(l/derived lens:token-type-open-status)))
|
||||||
|
@ -289,12 +290,12 @@
|
||||||
|
|
||||||
(for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)
|
(for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)
|
||||||
(:empty token-groups))]
|
(:empty token-groups))]
|
||||||
[:& token-component {:key token-key
|
[:> token-component* {:key token-key
|
||||||
:type token-key
|
:type token-key
|
||||||
:selected-shapes selected-shapes
|
:selected-shapes selected-shapes
|
||||||
:active-theme-tokens active-theme-tokens
|
:active-theme-tokens active-theme-tokens
|
||||||
:tokens tokens
|
:tokens tokens
|
||||||
:token-type-props token-type-props}])]))
|
:token-type-props token-type-props}])]))
|
||||||
|
|
||||||
(mf/defc import-export-button
|
(mf/defc import-export-button
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue