From df43912fe57bbef290c78211a0d0b25a7a090b35 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Mon, 26 Feb 2024 12:39:33 +0100 Subject: [PATCH] :bug: Fix different button size on webhooks --- frontend/src/app/main/ui/components/forms.cljs | 10 ++-------- frontend/src/app/main/ui/components/forms.scss | 7 ++++++- frontend/src/app/main/ui/dashboard/team_form.cljs | 2 +- frontend/src/app/main/ui/settings/profile.cljs | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/main/ui/components/forms.cljs b/frontend/src/app/main/ui/components/forms.cljs index d1f09ca60..b7ad29e5f 100644 --- a/frontend/src/app/main/ui/components/forms.cljs +++ b/frontend/src/app/main/ui/components/forms.cljs @@ -296,19 +296,13 @@ (mf/defc submit-button* {::mf/wrap-props false} - [{:keys [on-click children label form class name disabled large?] :as props}] + [{:keys [on-click children label form class name disabled] :as props}] (let [form (or form (mf/use-ctx form-ctx)) disabled? (or (and (some? form) (not (:valid @form))) (true? disabled)) - large? (d/nilv large? true) - - class (dm/str (d/nilv class "btn-primary") - " " - (if large? "btn-large" "") - " " - (if disabled? (stl/css :btn-disabled) "")) + class (d/nilv class (stl/css :button-submit)) name (d/nilv name "submit") diff --git a/frontend/src/app/main/ui/components/forms.scss b/frontend/src/app/main/ui/components/forms.scss index e393efadf..5325e94e7 100644 --- a/frontend/src/app/main/ui/components/forms.scss +++ b/frontend/src/app/main/ui/components/forms.scss @@ -257,7 +257,11 @@ } // SUBMIT-BUTTON -.btn-disabled { +.button-submit { + @extend .button-primary; +} + +:disabled { @extend .button-disabled; } @@ -422,6 +426,7 @@ fill: none; } } + //TEXTAREA .textarea-label { diff --git a/frontend/src/app/main/ui/dashboard/team_form.cljs b/frontend/src/app/main/ui/dashboard/team_form.cljs index b29df76af..ff500666d 100644 --- a/frontend/src/app/main/ui/dashboard/team_form.cljs +++ b/frontend/src/app/main/ui/dashboard/team_form.cljs @@ -117,6 +117,6 @@ {:label (if team (tr "labels.update-team") (tr "labels.create-team")) - :className (stl/css :accept-btn)}]]]]]])) + :class (stl/css :accept-btn)}]]]]]])) diff --git a/frontend/src/app/main/ui/settings/profile.cljs b/frontend/src/app/main/ui/settings/profile.cljs index 6a2613f9c..52593e029 100644 --- a/frontend/src/app/main/ui/settings/profile.cljs +++ b/frontend/src/app/main/ui/settings/profile.cljs @@ -80,7 +80,7 @@ [:> fm/submit-button* {:label (tr "dashboard.save-settings") :disabled (empty? (:touched @form)) - :className (stl/css :btn-primary)}] + :class (stl/css :btn-primary)}] [:div {:class (stl/css :links)} [:div {:class (stl/css :link-item)}