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

Get tokens from current or first token set

This commit is contained in:
Florian Schroedl 2024-08-15 14:26:22 +02:00
parent ead8a983ab
commit eaf568f154

View file

@ -14,6 +14,7 @@
[app.common.types.shape.layout :as ctl]
[app.main.data.workspace.state-helpers :as wsh]
[app.main.store :as st]
[app.main.ui.workspace.tokens.token-set :as wtts]
[okulary.core :as l]))
;; ---- Global refs
@ -234,10 +235,11 @@
(l/derived :workspace-data st/state))
(def workspace-tokens
(l/derived (fn [data]
(get data :tokens {}))
workspace-data
=))
(l/derived
(fn [data]
(or (wtts/get-selected-token-set-tokens data) {}))
st/state
=))
(def workspace-file-colors
(l/derived (fn [data]