mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 14:12:36 -05:00
Fix up active themes tokens method
This commit is contained in:
parent
577fa2bc81
commit
9f2b96332c
1 changed files with 8 additions and 8 deletions
|
@ -605,14 +605,14 @@
|
||||||
(get-active-themes this)))
|
(get-active-themes this)))
|
||||||
|
|
||||||
(get-active-themes-set-tokens [this]
|
(get-active-themes-set-tokens [this]
|
||||||
(mapcat (fn [x]
|
(reduce
|
||||||
(->> (get x :sets)
|
(fn [acc cur]
|
||||||
(map (fn [y]
|
(if (theme-active? this (:group cur) (:name cur))
|
||||||
(->
|
(into acc
|
||||||
(get-set this y)
|
(->> (get cur :sets)
|
||||||
:tokens)))))
|
(map #(-> (get-set this %) :tokens))))
|
||||||
(get-active-themes this)))
|
acc))
|
||||||
|
(d/ordered-map) (tree-seq d/ordered-map? vals themes)))
|
||||||
|
|
||||||
(validate [_]
|
(validate [_]
|
||||||
(and (valid-token-sets? sets) ;; TODO: validate set-groups
|
(and (valid-token-sets? sets) ;; TODO: validate set-groups
|
||||||
|
|
Loading…
Add table
Reference in a new issue