♻️ Migrate button-link to modern component syntax (#9428)

Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
Dexterity 2026-05-29 03:46:28 -04:00 committed by GitHub
parent 01ac1529e1
commit 53b1837b11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 18 deletions

View File

@ -219,28 +219,28 @@
[:div {:class (stl/css :auth-buttons)}
(when (contains? cf/flags :login-with-google)
[:& bl/button-link {:on-click login-with-google
:icon deprecated-icon/brand-google
:label (tr "auth.login-with-google-submit")
:class (stl/css :login-btn :btn-google-auth)}])
[:> bl/button-link* {:on-click login-with-google
:icon deprecated-icon/brand-google
:label (tr "auth.login-with-google-submit")
:class (stl/css :login-btn :btn-google-auth)}])
(when (contains? cf/flags :login-with-github)
[:& bl/button-link {:on-click login-with-github
:icon deprecated-icon/brand-github
:label (tr "auth.login-with-github-submit")
:class (stl/css :login-btn :btn-github-auth)}])
[:> bl/button-link* {:on-click login-with-github
:icon deprecated-icon/brand-github
:label (tr "auth.login-with-github-submit")
:class (stl/css :login-btn :btn-github-auth)}])
(when (contains? cf/flags :login-with-gitlab)
[:& bl/button-link {:on-click login-with-gitlab
:icon deprecated-icon/brand-gitlab
:label (tr "auth.login-with-gitlab-submit")
:class (stl/css :login-btn :btn-gitlab-auth)}])
[:> bl/button-link* {:on-click login-with-gitlab
:icon deprecated-icon/brand-gitlab
:label (tr "auth.login-with-gitlab-submit")
:class (stl/css :login-btn :btn-gitlab-auth)}])
(when (contains? cf/flags :login-with-oidc)
[:& bl/button-link {:on-click login-with-oidc
:icon deprecated-icon/brand-openid
:label (or (not-empty cf/oidc-name) (tr "auth.login-with-oidc-submit"))
:class (stl/css :login-btn :btn-oidc-auth)}])]))
[:> bl/button-link* {:on-click login-with-oidc
:icon deprecated-icon/brand-openid
:label (or (not-empty cf/oidc-name) (tr "auth.login-with-oidc-submit"))
:class (stl/css :login-btn :btn-oidc-auth)}])]))
(mf/defc login-dialog*
[{:keys [params] :as props}]

View File

@ -11,8 +11,7 @@
[app.util.keyboard :as kbd]
[rumext.v2 :as mf]))
(mf/defc button-link
{::mf/wrap-props false}
(mf/defc button-link*
[{:keys [on-click icon label class]}]
(let [on-key-down (mf/use-fn
(mf/deps on-click)