mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
💄 Add cosmetic changes to token-component component
This commit is contained in:
parent
a53c37bc3c
commit
769000da2d
1 changed files with 39 additions and 34 deletions
|
@ -78,7 +78,8 @@
|
|||
(l/derived lens:token-type-open-status)))
|
||||
{:keys [modal attributes all-attributes title]} token-type-props
|
||||
|
||||
on-context-menu (mf/use-fn
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
(fn [event token]
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
|
@ -88,10 +89,13 @@
|
|||
:errors (:errors token)
|
||||
:token-name (:name token)}))))
|
||||
|
||||
on-toggle-open-click (mf/use-fn
|
||||
on-toggle-open-click
|
||||
(mf/use-fn
|
||||
(mf/deps open? tokens)
|
||||
#(st/emit! (dt/set-token-type-section-open type (not open?))))
|
||||
on-popover-open-click (mf/use-fn
|
||||
|
||||
on-popover-open-click
|
||||
(mf/use-fn
|
||||
(fn [event]
|
||||
(mf/deps type title)
|
||||
(let [{:keys [key fields]} modal]
|
||||
|
@ -105,7 +109,8 @@
|
|||
:action "create"
|
||||
:token-type type}))))
|
||||
|
||||
on-token-pill-click (mf/use-fn
|
||||
on-token-pill-click
|
||||
(mf/use-fn
|
||||
(mf/deps selected-shapes token-type-props)
|
||||
(fn [event token]
|
||||
(dom/stop-propagation event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue