mirror of
https://github.com/penpot/penpot.git
synced 2025-06-11 15:51:39 +02:00
Inline concat
This commit is contained in:
parent
da0389e304
commit
82b44e6569
1 changed files with 6 additions and 4 deletions
|
@ -277,6 +277,7 @@
|
||||||
|
|
||||||
(defn generate-menu-entries [{:keys [token-id token-type-props token-type selected-shapes] :as context-data}]
|
(defn generate-menu-entries [{:keys [token-id token-type-props token-type selected-shapes] :as context-data}]
|
||||||
(let [{:keys [modal]} token-type-props
|
(let [{:keys [modal]} token-type-props
|
||||||
|
attribute-actions (additional-actions context-data)
|
||||||
default-actions [{:title "Delete Token" :action #(st/emit! (dt/delete-token token-id))}
|
default-actions [{:title "Delete Token" :action #(st/emit! (dt/delete-token token-id))}
|
||||||
{:title "Duplicate Token" :action #(st/emit! (dt/duplicate-token token-id))}
|
{:title "Duplicate Token" :action #(st/emit! (dt/duplicate-token token-id))}
|
||||||
{:title "Edit Token" :action (fn [event]
|
{:title "Edit Token" :action (fn [event]
|
||||||
|
@ -288,10 +289,11 @@
|
||||||
:y (.-clientY ^js event)
|
:y (.-clientY ^js event)
|
||||||
:position :right
|
:position :right
|
||||||
:fields fields
|
:fields fields
|
||||||
:token token})))}]
|
:token token})))}]]
|
||||||
specific-actions (additional-actions context-data)
|
(concat
|
||||||
all-actions (concat specific-actions [:separator] default-actions)]
|
attribute-actions
|
||||||
all-actions))
|
[:separator]
|
||||||
|
default-actions)))
|
||||||
|
|
||||||
(mf/defc token-pill-context-menu
|
(mf/defc token-pill-context-menu
|
||||||
[context-data]
|
[context-data]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue