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,7 +290,7 @@
(for [{:keys [token-key token-type-props tokens]} (concat (:filled token-groups)
(:empty token-groups))]
[:& token-component {:key token-key
[:> token-component* {:key token-key
:type token-key
:selected-shapes selected-shapes
:active-theme-tokens active-theme-tokens