Add theme deletion

This commit is contained in:
Florian Schroedl 2024-08-19 09:41:23 +02:00
parent 3413d4b42f
commit 8660c372dc
4 changed files with 17 additions and 4 deletions

View file

@ -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)

View file

@ -214,7 +214,7 @@
[:button {:on-click (fn [e]
(dom/prevent-default e)
(dom/stop-propagation e)
(st/emit! (wdt/delete-token-set id)))}
(st/emit! (wdt/delete-token-theme id)))}
"🗑️"]]]])]])]]
[:div.spaced
[:b "Sets"]