🎉 Add register confirmation page.

This commit is contained in:
Andrey Antukh 2021-02-03 22:04:02 +01:00 committed by Hirunatan
parent 1eff1c94c4
commit c14dbc19f8
5 changed files with 97 additions and 59 deletions

View file

@ -122,12 +122,12 @@
i/arrow-slide]]]))
(mf/defc submit-button
[{:keys [label form on-click] :as props}]
[{:keys [label form on-click disabled] :as props}]
(let [form (or form (mf/use-ctx form-ctx))]
[:input.btn-primary.btn-large
{:name "submit"
:class (when-not (:valid @form) "btn-disabled")
:disabled (not (:valid @form))
:disabled (or (not (:valid @form)) (true? disabled))
:on-click on-click
:value label
:type "submit"}]))