mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 19:11:40 +02:00
Allow token renaming
This commit is contained in:
parent
293250a30d
commit
965016b63f
3 changed files with 115 additions and 30 deletions
|
@ -168,6 +168,16 @@
|
|||
(rx/of
|
||||
(dch/commit-changes changes)))))))
|
||||
|
||||
(defn update-token-set [token-set]
|
||||
(ptk/reify ::update-token-set
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [prev-token-set (wtts/get-token-set (:id token-set) state)
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/update-token-set token-set prev-token-set))]
|
||||
(rx/of
|
||||
(dch/commit-changes changes))))))
|
||||
|
||||
(defn toggle-token-set [{:keys [token-set-id token-theme-id]}]
|
||||
(ptk/reify ::toggle-token-set
|
||||
ptk/WatchEvent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue