0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Show resolved color

This commit is contained in:
Florian Schroedl 2024-10-03 15:30:39 +02:00
parent b3e73b9abc
commit 2baa1aa734

View file

@ -45,7 +45,7 @@
(mf/defc token-pill
{::mf/wrap-props false}
[{:keys [on-click token theme-token highlighted? on-context-menu] :as props}]
[{:keys [on-click token theme-token highlighted? on-context-menu]}]
(let [{:keys [name value resolved-value errors]} token
errors? (and (seq errors) (seq (:errors theme-token)))]
[:button
@ -61,7 +61,9 @@
:on-click on-click
:on-context-menu on-context-menu
:disabled errors?}
(when-let [color (wtt/resolved-value-hex token)]
(when-let [color (if (seq (ctob/find-token-value-references (:value token)))
(wtt/resolved-value-hex theme-token)
(wtt/resolved-value-hex token))]
[:& color-bullet {:color color
:mini? true}])
name]))