0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00
This commit is contained in:
Florian Schroedl 2024-08-22 09:37:47 +02:00
parent c130dc39c3
commit 6c802bc132
4 changed files with 4 additions and 5 deletions

View file

@ -259,7 +259,7 @@
st/state
=))
(def get-active-theme-sets-tokens
(def workspace-active-theme-sets-tokens
(l/derived wtts/get-active-theme-sets-tokens-names-map st/state =))
(def workspace-selected-token-set-tokens

View file

@ -101,7 +101,7 @@
selection-parents-ref (mf/use-memo (mf/deps ids) #(refs/parents-by-ids ids))
selection-parents (mf/deref selection-parents-ref)
tokens (-> (mf/deref refs/get-active-theme-sets-tokens)
tokens (-> (mf/deref refs/workspace-active-theme-sets-tokens)
(sd/use-resolved-tokens))
tokens-by-type (mf/use-memo (mf/deps tokens) #(wtc/group-tokens-by-type tokens))

View file

@ -144,10 +144,9 @@ Token names should only contain letters and digits separated by . characters.")}
(mf/defc form
{::mf/wrap-props false}
[{:keys [token token-type] :as _args}]
(let [tokens (mf/deref refs/get-active-theme-sets-tokens)
(let [tokens (mf/deref refs/workspace-active-theme-sets-tokens)
resolved-tokens (sd/use-resolved-tokens tokens {:names-map? true
:cache-atom form-token-cache-atom})
_ (js/console.log "resolved-tokens" resolved-tokens)
token-path (mf/use-memo
(mf/deps (:name token))
#(wtt/token-name->path (:name token)))

View file

@ -135,6 +135,6 @@
(use-resolved-tokens config)))
(defn use-active-theme-sets-tokens [& {:as config}]
(-> (mf/deref refs/get-active-theme-sets-tokens)
(-> (mf/deref refs/workspace-active-theme-sets-tokens)
(use-resolved-tokens {:cache-atom !theme-tokens-cache
:names-map? true})))