mirror of
https://github.com/penpot/penpot.git
synced 2025-07-28 09:37:30 +02:00
✨ Add context menu item for set groups
This commit is contained in:
parent
d34c88b6e4
commit
53229c03d6
2 changed files with 22 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
(ns app.main.ui.workspace.tokens.sets-context-menu
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.tokens :as wdt]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
|
@ -40,6 +41,8 @@
|
|||
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)}
|
||||
(when (ctob/prefixed-set-path-final-group? prefixed-set-path)
|
||||
[:& menu-entry {:title "Add set to this group" :on-click js/console.log}])
|
||||
[:& menu-entry {:title (tr "labels.rename") :on-click edit-name}]
|
||||
[:& menu-entry {:title (tr "labels.delete") :on-click delete-set}]]))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue