mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 23:57:20 +02:00
Fix token set deletion
This commit is contained in:
parent
44105c2be2
commit
5cbcdb77c9
5 changed files with 19 additions and 20 deletions
|
@ -100,7 +100,7 @@
|
|||
(ptk/reify ::set-selected-token-set-path-from-name
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(->> (ctob/set-name->prefixed-set-name token-set-name)
|
||||
(->> (ctob/set-name-string->prefixed-set-path-string token-set-name)
|
||||
(wtts/assoc-selected-token-set-path state)))))
|
||||
|
||||
(defn create-token-theme [token-theme]
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
(defn default-actions [{:keys [token selected-token-set-path]}]
|
||||
(let [{:keys [modal]} (wtty/get-token-properties token)]
|
||||
[{:title "Delete Token"
|
||||
:action #(st/emit! (dt/delete-token (ctob/prefixed-set-full-path->set-name-name selected-token-set-path) (:name token)))}
|
||||
:action #(st/emit! (dt/delete-token (ctob/prefixed-set-path-string->set-name-string selected-token-set-path) (:name token)))}
|
||||
{:title "Duplicate Token"
|
||||
:action #(st/emit! (dt/duplicate-token (:name token)))}
|
||||
{:title "Edit Token"
|
||||
|
|
|
@ -352,7 +352,7 @@ Token names should only contain letters and digits separated by . characters.")}
|
|||
(fn [e]
|
||||
(dom/prevent-default e)
|
||||
(modal/hide!)
|
||||
(st/emit! (dt/delete-token (ctob/prefixed-set-full-path->set-name-name selected-token-set-path) (:name token)))))
|
||||
(st/emit! (dt/delete-token (ctob/prefixed-set-path-string->set-name-string selected-token-set-path) (:name token)))))
|
||||
|
||||
on-cancel
|
||||
(mf/use-fn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue