feat(ott-2680): fix styles

keep-around/2fd168b18eeebc91eac94ae86d817c12edfe1576
Ruslan Khayrullin 3 years ago
parent 6cedd406e5
commit d5887f9954
  1. 24
      src/features/AuthServiceApp/components/Login/index.tsx
  2. 23
      src/features/AuthServiceApp/components/Login/styled.tsx

@ -4,7 +4,7 @@ import { RecoveryPopup } from 'features/AuthServiceApp/components/RecoveryPopup'
import { client } from 'features/AuthServiceApp/config/clients' import { client } from 'features/AuthServiceApp/config/clients'
import { PAGES } from '../../config/pages' import { PAGES } from '../../config/pages'
// import { AuthProviders } from '../../config/authProviders' import { AuthProviders } from '../../config/authProviders'
import { LanguageSelect } from '../LanguageSelect' import { LanguageSelect } from '../LanguageSelect'
import { PasswordInput } from '../PasswordInput' import { PasswordInput } from '../PasswordInput'
import { Input } from '../../../../components/Input' import { Input } from '../../../../components/Input'
@ -26,11 +26,11 @@ import {
} from '../../styled' } from '../../styled'
import { import {
RegisterButton, RegisterButton,
// AuthButtonsContainer, AuthButtonsContainer,
// AuthButton, AuthButton,
// AuthButtonText, AuthButtonText,
// AuthButtonImage, AuthButtonImage,
// ContinueWith, ContinueWith,
} from './styled' } from './styled'
import { CompanyInfo } from '../../../CompanyInfo' import { CompanyInfo } from '../../../CompanyInfo'
@ -41,7 +41,7 @@ const Login = () => {
email, email,
formError, formError,
formRef, formRef,
// handleAuthButtonClick, handleAuthButtonClick,
handleModalOpen, handleModalOpen,
handleSubmit, handleSubmit,
isFetching, isFetching,
@ -121,21 +121,21 @@ const Login = () => {
<RegisterButton to={`${PAGES.registration}${window.location.search}`}> <RegisterButton to={`${PAGES.registration}${window.location.search}`}>
<T9n t='register' /> <T9n t='register' />
</RegisterButton> </RegisterButton>
{/* <ContinueWith t='or_continue_with' /> <ContinueWith t='or_continue_with' />
<AuthButtonsContainer> <AuthButtonsContainer>
<AuthButton onClick={handleAuthButtonClick(AuthProviders.Google)}> <AuthButton onClick={handleAuthButtonClick(AuthProviders.Google)}>
<AuthButtonImage authProvider={AuthProviders.Google} /> <AuthButtonImage authProvider={AuthProviders.Google} />
<AuthButtonText>Google</AuthButtonText> <AuthButtonText>Google</AuthButtonText>
</AuthButton> */} </AuthButton>
{/* <AuthButton onClick={handleAuthButtonClick(AuthProviders.Facebook)}> {/* <AuthButton onClick={handleAuthButtonClick(AuthProviders.Facebook)}>
<AuthButtonImage authProvider={AuthProviders.Facebook} /> <AuthButtonImage authProvider={AuthProviders.Facebook} />
<AuthButtonText>Facebook</AuthButtonText> <AuthButtonText>Facebook</AuthButtonText>
</AuthButton> */} </AuthButton> */}
{/* <AuthButton onClick={handleAuthButtonClick(AuthProviders.AppleID)}> {/* <AuthButton onClick={handleAuthButtonClick(AuthProviders.AppleID)}>
<AuthButtonImage authProvider={AuthProviders.AppleID} /> <AuthButtonImage authProvider={AuthProviders.AppleID} />
<AuthButtonText>Apple ID</AuthButtonText> <AuthButtonText>Apple ID</AuthButtonText>
</AuthButton> */} </AuthButton> */}
{/* </AuthButtonsContainer> */} </AuthButtonsContainer>
</ButtonsBlock> </ButtonsBlock>
<Container> <Container>
<ForgotPass onClick={handleModalOpen}> <ForgotPass onClick={handleModalOpen}>

@ -7,8 +7,6 @@ import { isMobileDevice } from 'config/userAgent'
import { outlineButtonStyles } from 'features/Common/Button' import { outlineButtonStyles } from 'features/Common/Button'
import { T9n } from 'features/T9n' import { T9n } from 'features/T9n'
import { visuallyHidden } from 'components/VisuallyHidden'
import { AuthProviders } from '../../config/authProviders' import { AuthProviders } from '../../config/authProviders'
type TAuthButtonImage = { type TAuthButtonImage = {
@ -63,14 +61,12 @@ export const AuthButton = styled.button`
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 154px; width: 100%;
height: 50px; height: 50px;
border-radius: 5px; border-radius: 5px;
${isMobileDevice ${isMobileDevice
? css` ? css`
width: 100%;
justify-content: flex-start;
height: 44px; height: 44px;
border-radius: 10px; border-radius: 10px;
` `
@ -79,28 +75,21 @@ export const AuthButton = styled.button`
export const AuthButtonText = styled.span` export const AuthButtonText = styled.span`
opacity: 0.8; opacity: 0.8;
font-size: 20px;
${isMobileDevice ? '' : visuallyHidden};
` `
export const AuthButtonImage = styled.div<TAuthButtonImage>` export const AuthButtonImage = styled.div<TAuthButtonImage>`
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
width: 100%; margin-right: 20px;
height: 32px; background-position: right;
${isMobileDevice
? css`
width: 45%;
margin-right: 20px;
background-position: right;
`
: ''}
${({ authProvider }) => { ${({ authProvider }) => {
switch (authProvider) { switch (authProvider) {
case AuthProviders.Google: case AuthProviders.Google:
return css` return css`
width: 32px;
height: 32px;
background-image: url(/images/oauth/google.svg); background-image: url(/images/oauth/google.svg);
` `

Loading…
Cancel
Save