0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 20:09:04 -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" :name "Token Set"
:tokens []} :tokens []}
token-set)] token-set)]
(ptk/reify ::update-create-token (ptk/reify ::create-token-set
ptk/WatchEvent ptk/WatchEvent
(watch [it _ _] (watch [it _ _]
(let [changes (-> (pcb/empty-changes it) (let [changes (-> (pcb/empty-changes it)

View file

@ -155,10 +155,14 @@
:flex-direction "column" :flex-direction "column"
:gap "10px"}} :gap "10px"}}
[:& labeled-input {:label "Group name" [:& 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" [:& labeled-input {:label "Theme name"
:input-props {:value @name}}] :input-props {:value @name
[:button "Create"]])) :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 (mf/defc token-sets
[_props] [_props]