mirror of
https://github.com/penpot/penpot.git
synced 2025-01-20 05:34:23 -05:00
♻ Rename to match ITokenSet glossary
This commit is contained in:
parent
42ee08445b
commit
384616c9a8
2 changed files with 6 additions and 7 deletions
|
@ -72,7 +72,7 @@
|
|||
(st/emit!
|
||||
(wdt/show-token-set-context-menu
|
||||
{:position (dom/get-client-position event)
|
||||
:tree-path tree-path})))))]
|
||||
:prefixed-set-path tree-path})))))]
|
||||
[:div {;; :ref dref
|
||||
:role "button"
|
||||
:data-testid "tokens-set-group-item"
|
||||
|
@ -123,8 +123,7 @@
|
|||
(st/emit!
|
||||
(wdt/show-token-set-context-menu
|
||||
{:position (dom/get-client-position event)
|
||||
:tree-path tree-path})))))]
|
||||
|
||||
:prefixed-set-path tree-path})))))]
|
||||
[:div {;; :ref dref
|
||||
:role "button"
|
||||
:data-testid "tokens-set-item"
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
[:span {:class (stl/css :title)} title]])
|
||||
|
||||
(mf/defc menu
|
||||
[{:keys [tree-path]}]
|
||||
[{:keys [prefixed-set-path]}]
|
||||
(let [{:keys [on-edit]} (sets-context/use-context)
|
||||
edit-name (mf/use-fn #(on-edit tree-path))
|
||||
delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path tree-path)))]
|
||||
edit-name (mf/use-fn #(on-edit prefixed-set-path))
|
||||
delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path prefixed-set-path)))]
|
||||
[:ul {:class (stl/css :context-list)}
|
||||
[:& menu-entry {:title (tr "labels.rename") :on-click edit-name}]
|
||||
[:& menu-entry {:title (tr "labels.delete") :on-click delete-set}]]))
|
||||
|
@ -61,4 +61,4 @@
|
|||
:ref dropdown-ref
|
||||
:style {:top top :left left}
|
||||
:on-context-menu prevent-default}
|
||||
[:& menu {:tree-path (:tree-path mdata)}]]]))
|
||||
[:& menu {:prefixed-set-path (:prefixed-set-path mdata)}]]]))
|
||||
|
|
Loading…
Add table
Reference in a new issue