mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 22:22:43 -05:00
Show resolved color
This commit is contained in:
parent
b3e73b9abc
commit
2baa1aa734
1 changed files with 4 additions and 2 deletions
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
(mf/defc token-pill
|
(mf/defc token-pill
|
||||||
{::mf/wrap-props false}
|
{::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
|
(let [{:keys [name value resolved-value errors]} token
|
||||||
errors? (and (seq errors) (seq (:errors theme-token)))]
|
errors? (and (seq errors) (seq (:errors theme-token)))]
|
||||||
[:button
|
[:button
|
||||||
|
@ -61,7 +61,9 @@
|
||||||
:on-click on-click
|
:on-click on-click
|
||||||
:on-context-menu on-context-menu
|
:on-context-menu on-context-menu
|
||||||
:disabled errors?}
|
: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
|
[:& color-bullet {:color color
|
||||||
:mini? true}])
|
:mini? true}])
|
||||||
name]))
|
name]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue