From f6b1d4fa17aa691f22cf794977797b2a5852e535 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Mon, 23 Mar 2020 17:26:36 +0100 Subject: [PATCH] Review#5: use `EuiSpacer` instead of CSS margin. --- .../authentication/login/_login_page.scss | 4 -- .../__snapshots__/login_form.test.tsx.snap | 16 +++++-- .../components/login_form/login_form.tsx | 44 ++++++++++--------- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/x-pack/plugins/security/public/authentication/login/_login_page.scss b/x-pack/plugins/security/public/authentication/login/_login_page.scss index 33d66e1d93eed..cdfad55ee064a 100644 --- a/x-pack/plugins/security/public/authentication/login/_login_page.scss +++ b/x-pack/plugins/security/public/authentication/login/_login_page.scss @@ -27,7 +27,3 @@ max-width: 700px; } } - -.loginWelcome__selectorButton { - margin-bottom: $euiSize; -} diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap b/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap index 9fd32c2d64310..84565b91d6d73 100644 --- a/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/__snapshots__/login_form.test.tsx.snap @@ -3,7 +3,6 @@ exports[`LoginForm login selector renders as expected with login form 1`] = ` Login w/SAML + Login w/PKI + Login w/SAML + + `; diff --git a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx index a8a1f3b534625..417bb121637f3 100644 --- a/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx +++ b/x-pack/plugins/security/public/authentication/login/components/login_form/login_form.tsx @@ -214,27 +214,29 @@ export class LoginForm extends Component { return ( <> - {this.props.selector.providers.map(provider => ( - this.loginWithSelector(provider.type, provider.name)} - > - {provider.description ?? ( - - )} - + {this.props.selector.providers.map((provider, index) => ( + + this.loginWithSelector(provider.type, provider.name)} + > + {provider.description ?? ( + + )} + + + ))} {loginSelectorAndLoginFormSeparator}