mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 04:41:37 +02: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!
|
(st/emit!
|
||||||
(wdt/show-token-set-context-menu
|
(wdt/show-token-set-context-menu
|
||||||
{:position (dom/get-client-position event)
|
{:position (dom/get-client-position event)
|
||||||
:tree-path tree-path})))))]
|
:prefixed-set-path tree-path})))))]
|
||||||
[:div {;; :ref dref
|
[:div {;; :ref dref
|
||||||
:role "button"
|
:role "button"
|
||||||
:data-testid "tokens-set-group-item"
|
:data-testid "tokens-set-group-item"
|
||||||
|
@ -123,8 +123,7 @@
|
||||||
(st/emit!
|
(st/emit!
|
||||||
(wdt/show-token-set-context-menu
|
(wdt/show-token-set-context-menu
|
||||||
{:position (dom/get-client-position event)
|
{:position (dom/get-client-position event)
|
||||||
:tree-path tree-path})))))]
|
:prefixed-set-path tree-path})))))]
|
||||||
|
|
||||||
[:div {;; :ref dref
|
[:div {;; :ref dref
|
||||||
:role "button"
|
:role "button"
|
||||||
:data-testid "tokens-set-item"
|
:data-testid "tokens-set-item"
|
||||||
|
|
|
@ -35,10 +35,10 @@
|
||||||
[:span {:class (stl/css :title)} title]])
|
[:span {:class (stl/css :title)} title]])
|
||||||
|
|
||||||
(mf/defc menu
|
(mf/defc menu
|
||||||
[{:keys [tree-path]}]
|
[{:keys [prefixed-set-path]}]
|
||||||
(let [{:keys [on-edit]} (sets-context/use-context)
|
(let [{:keys [on-edit]} (sets-context/use-context)
|
||||||
edit-name (mf/use-fn #(on-edit tree-path))
|
edit-name (mf/use-fn #(on-edit prefixed-set-path))
|
||||||
delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path tree-path)))]
|
delete-set (mf/use-fn #(st/emit! (wdt/delete-token-set-path prefixed-set-path)))]
|
||||||
[:ul {:class (stl/css :context-list)}
|
[:ul {:class (stl/css :context-list)}
|
||||||
[:& menu-entry {:title (tr "labels.rename") :on-click edit-name}]
|
[:& menu-entry {:title (tr "labels.rename") :on-click edit-name}]
|
||||||
[:& menu-entry {:title (tr "labels.delete") :on-click delete-set}]]))
|
[:& menu-entry {:title (tr "labels.delete") :on-click delete-set}]]))
|
||||||
|
@ -61,4 +61,4 @@
|
||||||
:ref dropdown-ref
|
:ref dropdown-ref
|
||||||
:style {:top top :left left}
|
:style {:top top :left left}
|
||||||
:on-context-menu prevent-default}
|
:on-context-menu prevent-default}
|
||||||
[:& menu {:tree-path (:tree-path mdata)}]]]))
|
[:& menu {:prefixed-set-path (:prefixed-set-path mdata)}]]]))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue