0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

De-Applying token

This commit is contained in:
Florian Schroedl 2024-05-24 07:34:43 +02:00
parent 2dd994799c
commit 406e8d110c

View file

@ -108,6 +108,13 @@
{:shape shape
:tokens border-radius-tokens
:attributes (wtc/token-attributes :border-radius)}))
sizing-tokens (:sizing tokens-by-type)
sizing-options (mf/use-memo
(mf/deps shape sizing-tokens)
#(wtc/tokens-name-map->select-options
{:shape shape
:tokens sizing-tokens
:attributes (wtc/token-attributes :sizing)}))
flex-child? (->> selection-parents (some ctl/flex-layout?))
absolute? (ctl/item-absolute? shape)
@ -223,6 +230,10 @@
(mf/deps ids)
(fn [value attr]
(st/emit! (udw/trigger-bounding-box-cloaking ids)
(dch/update-shapes ids
#(assoc % :applied-tokens {})
{:reg-objects? true
:attrs [:applied-tokens]})
(udw/update-dimensions ids attr value))))
on-proportion-lock-change