diff --git a/common/src/app/common/types/token.cljc b/common/src/app/common/types/token.cljc index 67b86ef8c..9b6cd5201 100644 --- a/common/src/app/common/types/token.cljc +++ b/common/src/app/common/types/token.cljc @@ -73,7 +73,7 @@ (def stroke-width-keys (schema-keys ::stroke-width)) -(sm/def! ::dimensions +(sm/def! ::sizing [:map [:width {:optional true} ::sm/uuid] [:height {:optional true} ::sm/uuid] @@ -82,7 +82,7 @@ [:min-width {:optional true} ::sm/uuid] [:max-width {:optional true} ::sm/uuid]]) -(def dimensions-keys (schema-keys ::dimensions)) +(def sizing-keys (schema-keys ::sizing)) (sm/def! ::opacity [:map @@ -104,11 +104,20 @@ (def spacing-keys (schema-keys ::spacing)) +(sm/def! ::dimensions + (merge-schemas ::sizing + ::spacing + ::stroke-width + ::border-radius)) + +(def dimensions-keys (schema-keys ::dimensions)) + (sm/def! ::tokens [:map {:title "Applied Tokens"}]) (sm/def! ::applied-tokens (merge-schemas ::tokens ::border-radius - ::dimensions - ::spacing)) + ::sizing + ::spacing + ::dimensions)) diff --git a/frontend/src/app/main/ui/workspace/tokens/core.cljs b/frontend/src/app/main/ui/workspace/tokens/core.cljs index dee160729..b1e0aabbf 100644 --- a/frontend/src/app/main/ui/workspace/tokens/core.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/core.cljs @@ -113,6 +113,8 @@ :type :box-shadow}]}}] [:sizing {:title "Sizing" + :attributes ctt/sizing-keys + :on-update-shape update-shape-dimensions :modal {:key :tokens/sizing :fields [{:label "Sizing" :key :sizing}]}}]