From b522876a8fad837b382eff497da94d1e628fba65 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Thu, 10 Nov 2022 15:29:42 +0800 Subject: [PATCH] style(ui): layout styling updates layout styling updates --- .../BrandingHeader/index.module.scss | 8 ++----- .../ui/src/components/Input/index.module.scss | 3 ++- .../src/components/Passcode/index.module.scss | 3 ++- .../SecondaryPageWrapper/index.module.scss | 14 ++++++++---- .../components/SecondaryPageWrapper/index.tsx | 11 ++++++---- .../containers/EmailForm/index.module.scss | 7 +++--- .../EmailPassword/index.module.scss | 17 +++++++++++--- .../ui/src/containers/EmailPassword/index.tsx | 4 ++-- .../PasswordSignInForm/index.module.scss | 19 +++++++++++++--- .../containers/PhoneForm/index.module.scss | 7 +++--- .../PhonePassword/index.module.scss | 16 +++++++++++--- .../containers/SetPassword/index.module.scss | 7 +++--- .../UsernameSignIn/index.module.scss | 15 ++++++++++--- .../ui/src/pages/Register/index.module.scss | 22 ++++--------------- packages/ui/src/pages/Register/index.tsx | 7 +++++- .../ui/src/pages/SignIn/index.module.scss | 21 ++++-------------- packages/ui/src/pages/SignIn/index.tsx | 7 +++++- 17 files changed, 112 insertions(+), 76 deletions(-) diff --git a/packages/ui/src/components/BrandingHeader/index.module.scss b/packages/ui/src/components/BrandingHeader/index.module.scss index 8ff312b73..f8e2a1a15 100644 --- a/packages/ui/src/components/BrandingHeader/index.module.scss +++ b/packages/ui/src/components/BrandingHeader/index.module.scss @@ -1,6 +1,6 @@ @use '@/scss/underscore' as _; -$logo-height: 60px; +$logo-height: 50px; .container { width: 100%; @@ -36,12 +36,8 @@ $logo-height: 60px; } :global(body.desktop) { - .container { - min-height: 96px; - } - .logo:not(:last-child) { - margin-bottom: _.unit(4); + margin-bottom: _.unit(3); } .headline { diff --git a/packages/ui/src/components/Input/index.module.scss b/packages/ui/src/components/Input/index.module.scss index 7e8d1db7f..d41289a68 100644 --- a/packages/ui/src/components/Input/index.module.scss +++ b/packages/ui/src/components/Input/index.module.scss @@ -56,7 +56,8 @@ } .errorMessage { - margin-top: _.unit(2); + margin-left: _.unit(0.5); + margin-top: _.unit(1); } :global(body.desktop) { diff --git a/packages/ui/src/components/Passcode/index.module.scss b/packages/ui/src/components/Passcode/index.module.scss index 67a286d43..e182f14fd 100644 --- a/packages/ui/src/components/Passcode/index.module.scss +++ b/packages/ui/src/components/Passcode/index.module.scss @@ -27,7 +27,8 @@ } .passcode + .errorMessage { - margin-top: _.unit(2); + margin-left: _.unit(0.5); + margin-top: _.unit(1); } :global(body.desktop) { diff --git a/packages/ui/src/components/SecondaryPageWrapper/index.module.scss b/packages/ui/src/components/SecondaryPageWrapper/index.module.scss index fcf505167..8fe177618 100644 --- a/packages/ui/src/components/SecondaryPageWrapper/index.module.scss +++ b/packages/ui/src/components/SecondaryPageWrapper/index.module.scss @@ -9,8 +9,12 @@ margin-top: _.unit(2); } -.description { +.header { margin-bottom: _.unit(6); +} + +.description { + margin-top: _.unit(2); @include _.text-hint; } @@ -21,7 +25,6 @@ .title { @include _.title; - margin-bottom: _.unit(6); } } @@ -30,8 +33,11 @@ margin-top: _.unit(12); } - .title { - @include _.title_desktop; + .header { margin-bottom: _.unit(4); } + + .title { + @include _.title_desktop; + } } diff --git a/packages/ui/src/components/SecondaryPageWrapper/index.tsx b/packages/ui/src/components/SecondaryPageWrapper/index.tsx index 61e1f31b8..44a718bdd 100644 --- a/packages/ui/src/components/SecondaryPageWrapper/index.tsx +++ b/packages/ui/src/components/SecondaryPageWrapper/index.tsx @@ -26,10 +26,13 @@ const SecondaryPageWrapper = ({
- {title &&
{t(title, titleProps)}
} - {description && ( -
{t(description, descriptionProps)}
- )} +
+ {title &&
{t(title, titleProps)}
} + {description && ( +
{t(description, descriptionProps)}
+ )} +
+ {children}
diff --git a/packages/ui/src/containers/EmailForm/index.module.scss b/packages/ui/src/containers/EmailForm/index.module.scss index b7d9e3406..4c7c856ee 100644 --- a/packages/ui/src/containers/EmailForm/index.module.scss +++ b/packages/ui/src/containers/EmailForm/index.module.scss @@ -9,7 +9,8 @@ .inputField, .terms, - .switch { + .switch, + .formErrors { margin-bottom: _.unit(4); } @@ -19,7 +20,7 @@ } .formErrors { - margin-top: _.unit(-2); - margin-bottom: _.unit(4); + margin-left: _.unit(0.5); + margin-top: _.unit(-3); } } diff --git a/packages/ui/src/containers/EmailPassword/index.module.scss b/packages/ui/src/containers/EmailPassword/index.module.scss index a2028eed0..d2a57a262 100644 --- a/packages/ui/src/containers/EmailPassword/index.module.scss +++ b/packages/ui/src/containers/EmailPassword/index.module.scss @@ -9,17 +9,28 @@ .inputField, .link, - .terms { + .terms, + .formErrors { margin-bottom: _.unit(4); } .link { + margin-top: _.unit(-1); width: auto; align-self: start; } .formErrors { - margin-top: _.unit(-2); - margin-bottom: _.unit(4); + margin-top: _.unit(-3); + margin-left: _.unit(0.5); + } +} + + +:global(.desktop) { + .form { + .link { + margin-top: _.unit(-2); + } } } diff --git a/packages/ui/src/containers/EmailPassword/index.tsx b/packages/ui/src/containers/EmailPassword/index.tsx index 25619ca44..e883f2616 100644 --- a/packages/ui/src/containers/EmailPassword/index.tsx +++ b/packages/ui/src/containers/EmailPassword/index.tsx @@ -89,6 +89,8 @@ const EmailPassword = ({ className, autoFocus }: Props) => { {...register('password', (value) => requiredValidation('password', value))} /> + {errorMessage && {errorMessage}} + {isForgotPasswordEnabled && ( { /> )} - {errorMessage && {errorMessage}} -