0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Merge pull request #278 from tokens-studio/fix-set-token-name

Allow giving name of tokens in other sets
This commit is contained in:
Florian Schrödl 2024-09-11 15:11:02 +02:00 committed by GitHub
commit 1568a7afb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -145,6 +145,7 @@ Token names should only contain letters and digits separated by . characters.")}
{::mf/wrap-props false}
[{:keys [token token-type] :as _args}]
(let [tokens (mf/deref refs/workspace-ordered-token-sets-tokens)
selected-set-tokens (mf/deref refs/workspace-selected-token-set-tokens)
active-theme-tokens (mf/deref refs/workspace-active-theme-sets-tokens)
resolved-tokens (sd/use-resolved-tokens active-theme-tokens {:names-map? true
:cache-atom form-token-cache-atom})
@ -154,7 +155,7 @@ Token names should only contain letters and digits separated by . characters.")}
selected-set-tokens-tree (mf/use-memo
(mf/deps token-path tokens)
(fn []
(-> (wtt/token-names-tree tokens)
(-> (wtt/token-names-tree selected-set-tokens)
;; Allow setting editing token to it's own path
(d/dissoc-in token-path))))