mirror of
https://github.com/penpot/penpot.git
synced 2026-06-09 08:52:05 +00:00
♻️ Migrate button-link to modern component syntax (#9428)
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
01ac1529e1
commit
53b1837b11
@ -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}]
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user