diff --git a/frontend/src/app/main/ui/workspace/tokens/changes.cljs b/frontend/src/app/main/ui/workspace/tokens/changes.cljs index 3cea08e69..e0c0f0910 100644 --- a/frontend/src/app/main/ui/workspace/tokens/changes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/changes.cljs @@ -143,6 +143,14 @@ [value shape-ids] (update-color wdc/change-stroke value shape-ids)) +(defn update-fill-stroke [value shape-ids attributes] + (ptk/reify ::update-fill-stroke + ptk/WatchEvent + (watch [_ _ _] + (rx/of + (when (:fill attributes) (update-fill value shape-ids)) + (when (:stroke-color attributes) (update-stroke-color value shape-ids)))))) + (defn update-shape-dimensions [value shape-ids attributes] (ptk/reify ::update-shape-dimensions ptk/WatchEvent diff --git a/frontend/src/app/main/ui/workspace/tokens/token_types.cljs b/frontend/src/app/main/ui/workspace/tokens/token_types.cljs index b8247a288..f5979add4 100644 --- a/frontend/src/app/main/ui/workspace/tokens/token_types.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/token_types.cljs @@ -23,8 +23,9 @@ :color {:title "Color" - :attributes ctt/color-keys - :on-update-shape wtch/update-fill + :attributes #{:fill} + :all-attributes ctt/color-keys + :on-update-shape wtch/update-fill-stroke :modal {:key :tokens/color :fields [{:label "Color" :key :color}]}} diff --git a/frontend/src/app/main/ui/workspace/tokens/update.cljs b/frontend/src/app/main/ui/workspace/tokens/update.cljs index bc85bea83..2d4120b01 100644 --- a/frontend/src/app/main/ui/workspace/tokens/update.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/update.cljs @@ -19,8 +19,7 @@ (def attributes->shape-update {#{:rx :ry} (fn [v ids _] (wtch/update-shape-radius-all v ids)) #{:r1 :r2 :r3 :r4} wtch/update-shape-radius-single-corner - #{:fill} wtch/update-fill - #{:stroke-color} wtch/update-stroke-color + ctt/color-keys wtch/update-fill-stroke ctt/stroke-width-keys wtch/update-stroke-width ctt/sizing-keys wtch/update-shape-dimensions ctt/opacity-keys wtch/update-opacity