0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Add theme creation

This commit is contained in:
Florian Schroedl 2024-08-16 07:09:59 +02:00
parent 8482a128de
commit 7406af2e79
2 changed files with 8 additions and 4 deletions

View file

@ -108,7 +108,7 @@
:name "Token Set"
:tokens []}
token-set)]
(ptk/reify ::update-create-token
(ptk/reify ::create-token-set
ptk/WatchEvent
(watch [it _ _]
(let [changes (-> (pcb/empty-changes it)

View file

@ -155,10 +155,14 @@
:flex-direction "column"
:gap "10px"}}
[:& labeled-input {:label "Group name"
:input-props {:value @group}}]
:input-props {:value @group
:on-change #(reset! group (dom/event->value %))}}]
[:& labeled-input {:label "Theme name"
:input-props {:value @name}}]
[:button "Create"]]))
:input-props {:value @name
:on-change #(reset! name (dom/event->value %))}}]
[:button {:on-click #(st/emit! (wdt/create-token-theme {:group @group
:name @name}))}
"Create"]]))
(mf/defc token-sets
[_props]