mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 07:27:17 +02:00
tokens-lib refactor: Get collection of theme groups
This commit is contained in:
parent
0697e69888
commit
f0a9444ab6
3 changed files with 35 additions and 6 deletions
|
@ -15,7 +15,8 @@
|
|||
[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]))
|
||||
[okulary.core :as l]
|
||||
[app.common.types.tokens-lib :as ctob]))
|
||||
|
||||
;; ---- Global refs
|
||||
|
||||
|
@ -240,13 +241,18 @@
|
|||
st/state
|
||||
=))
|
||||
|
||||
;; ---- Tokens
|
||||
|
||||
(def tokens-lib
|
||||
(l/derived :tokens-lib workspace-data))
|
||||
|
||||
(def workspace-token-theme-groups
|
||||
(l/derived #(some-> % ctob/get-theme-groups) tokens-lib))
|
||||
|
||||
(defn workspace-token-theme
|
||||
[id]
|
||||
(l/derived #(wtts/get-workspace-theme id %) st/state))
|
||||
|
||||
(def workspace-token-theme-groups
|
||||
(l/derived wtts/get-workspace-theme-groups st/state))
|
||||
|
||||
(def workspace-active-theme-ids
|
||||
(l/derived wtts/get-active-theme-ids st/state))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue