0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-20 13:42:59 -05:00

🐛 Fix references between separate sets

This commit is contained in:
Florian Schroedl 2024-11-21 15:38:53 +01:00
parent 805432faec
commit e7b07715a4
2 changed files with 10 additions and 4 deletions

View file

@ -260,8 +260,12 @@
active-theme-tokens (sd/use-active-theme-sets-tokens)
tokens (sd/use-resolved-workspace-tokens)
token-groups (mf/with-memo [tokens]
(sorted-token-groups tokens))]
selected-token-set-tokens (mf/deref refs/workspace-selected-token-set-tokens)
token-groups (mf/with-memo [tokens selected-token-set-tokens]
(-> (select-keys tokens (keys selected-token-set-tokens))
(sorted-token-groups)))]
[:*
[:& token-context-menu]
[:& title-bar {:all-clickable true

View file

@ -252,8 +252,10 @@
@tokens-state))
(defn use-resolved-workspace-tokens []
(-> (mf/deref refs/workspace-selected-token-set-tokens)
(use-resolved-tokens)))
(let [active-theme-tokens (mf/deref refs/workspace-active-theme-sets-tokens)
selected-token-set-tokens (mf/deref refs/workspace-selected-token-set-tokens)
prefer-selected-token-set-tokens (merge active-theme-tokens selected-token-set-tokens)]
(use-resolved-tokens prefer-selected-token-set-tokens)))
(defn use-active-theme-sets-tokens []
(-> (mf/deref refs/workspace-active-theme-sets-tokens)