From 2baa1aa734a528d2a61bfd45328fb935609a4a3a Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 3 Oct 2024 15:30:39 +0200 Subject: [PATCH] Show resolved color --- frontend/src/app/main/ui/workspace/tokens/sidebar.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs index 683265113..aae169062 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs @@ -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]))