mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 22:01:39 +02:00
Add theme deletion
This commit is contained in:
parent
3413d4b42f
commit
8660c372dc
4 changed files with 17 additions and 4 deletions
|
@ -128,6 +128,16 @@
|
|||
(pcb/update-active-token-themes new-themes themes))]
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
|
||||
(defn delete-token-theme [token-theme-id]
|
||||
(ptk/reify ::delete-token-theme
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [data (get state :workspace-data)
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/with-library-data data)
|
||||
(pcb/delete-token-theme token-theme-id))]
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
|
||||
(defn create-token-set [token-set]
|
||||
(let [new-token-set (merge
|
||||
{:id (uuid/next)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue