0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-24 07:46:13 -05:00

🐛 Use correct jsx handler on team choice form

This commit is contained in:
Andrey Antukh 2024-01-11 15:25:00 +01:00
parent 4d54768875
commit 9ed6d5f360
2 changed files with 9 additions and 12 deletions

View file

@ -288,8 +288,7 @@
(mf/defc submit-button* (mf/defc submit-button*
{::mf/wrap-props false} {::mf/wrap-props false}
[{:keys [on-click children label form class-name name disabled] :as props}] [{:keys [on-click children label form class-name name disabled] :as props}]
(let [form (or (unchecked-get props "form") (let [form (or form (mf/use-ctx form-ctx))
(mf/use-ctx form-ctx))
disabled? (or (and (some? form) (not (:valid @form))) disabled? (or (and (some? form) (not (:valid @form)))
(true? disabled)) (true? disabled))
@ -315,8 +314,7 @@
(obj/set! "name" name) (obj/set! "name" name)
(obj/set! "label" mf/undefined) (obj/set! "label" mf/undefined)
(obj/set! "className" class) (obj/set! "className" class)
(obj/set! "type" "submit")) (obj/set! "type" "submit"))]
]
[:> "button" props [:> "button" props
(if (some? children) (if (some? children)

View file

@ -102,8 +102,8 @@
:label (tr "onboarding.choice.team-up.create-team-placeholder")}] :label (tr "onboarding.choice.team-up.create-team-placeholder")}]
[:div {:class (stl/css :action-buttons)} [:div {:class (stl/css :action-buttons)}
[:& fm/submit-button* [:> fm/submit-button*
{:className (stl/css :accept-button) {:class (stl/css :accept-button)
:label (tr "onboarding.choice.team-up.continue-creating-team")}]]]] :label (tr "onboarding.choice.team-up.continue-creating-team")}]]]]
[:div {:class (stl/css :second-block)} [:div {:class (stl/css :second-block)}
[:h2 {:class (stl/css :modal-title)} [:h2 {:class (stl/css :modal-title)}
@ -236,10 +236,9 @@
:step 2}))} :step 2}))}
(tr "labels.back")] (tr "labels.back")]
[:& fm/submit-button* [:> fm/submit-button*
{:className (stl/css :accept-button) {:class (stl/css :accept-button)
:label :label (if (> (count emails) 0)
(if (> (count emails) 0)
(tr "onboarding.choice.team-up.create-team-and-invite") (tr "onboarding.choice.team-up.create-team-and-invite")
(tr "onboarding.choice.team-up.create-team-without-invite"))}]] (tr "onboarding.choice.team-up.create-team-without-invite"))}]]
[:div {:class (stl/css :modal-hint)} [:div {:class (stl/css :modal-hint)}