fix(auth): adjust layout for responsive design in authentication steps
This commit is contained in:
@@ -36,7 +36,7 @@ export const AccountCreated = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AuthenticationCard maxWidth="636px">
|
<AuthenticationCard>
|
||||||
<Stack sx={{ alignItems: 'center' }}>
|
<Stack sx={{ alignItems: 'center' }}>
|
||||||
<img src={AccountCreatedIcon} />
|
<img src={AccountCreatedIcon} />
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ import { Paper, type SxProps, type Theme } from '@mui/material';
|
|||||||
import { type PropsWithChildren } from 'react';
|
import { type PropsWithChildren } from 'react';
|
||||||
|
|
||||||
export interface AuthenticationCardProps extends PropsWithChildren {
|
export interface AuthenticationCardProps extends PropsWithChildren {
|
||||||
maxWidth?: string;
|
|
||||||
sx?: SxProps<Theme>;
|
sx?: SxProps<Theme>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AuthenticationCard = ({
|
export const AuthenticationCard = ({
|
||||||
children,
|
children,
|
||||||
maxWidth,
|
|
||||||
sx,
|
sx,
|
||||||
}: AuthenticationCardProps) => {
|
}: AuthenticationCardProps) => {
|
||||||
return (
|
return (
|
||||||
@@ -22,8 +20,7 @@ export const AuthenticationCard = ({
|
|||||||
},
|
},
|
||||||
mx: 2,
|
mx: 2,
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
width: (t) => `calc(100% - ${t.spacing(2)})`,
|
maxWidth: 636,
|
||||||
maxWidth: maxWidth ?? '552px',
|
|
||||||
|
|
||||||
...sx,
|
...sx,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -124,21 +124,21 @@ export const EnterPasswordForm = ({
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: { xs: 'column', sm: 'row' },
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
gap: 4,
|
gap: 1,
|
||||||
mb: 0.5,
|
mb: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h5">
|
<Typography variant="h5" sx={{ order: { xs: 2, sm: 1 } }}>
|
||||||
{t('enterPassword.loginWithPassword')}
|
{t('enterPassword.loginWithPassword')}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
size="large"
|
size="large"
|
||||||
sx={{ width: 'auto', textTransform: 'none' }}
|
sx={{ width: 'auto', textTransform: 'none', order: { xs: 1, sm: 1 } }}
|
||||||
endIcon={<Icon Component={Edit2} />}
|
endIcon={<Icon Component={Edit2} />}
|
||||||
onClick={onEditValue}
|
onClick={onEditValue}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export function OtpVerifyForm({
|
|||||||
if (!cancelled && otp?.code) {
|
if (!cancelled && otp?.code) {
|
||||||
setOtpCode(otp.code);
|
setOtpCode(otp.code);
|
||||||
}
|
}
|
||||||
} catch { }
|
} catch {}
|
||||||
};
|
};
|
||||||
|
|
||||||
run();
|
run();
|
||||||
@@ -217,13 +217,16 @@ export function OtpVerifyForm({
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: { xs: 'column', sm: 'row' },
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
gap: 1,
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
mb: 0.5,
|
mb: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h5">{t('verify.verify')}</Typography>
|
<Typography variant="h5" sx={{ order: { xs: 2, sm: 1 } }}>
|
||||||
|
{t('verify.verify')}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
@@ -231,6 +234,7 @@ export function OtpVerifyForm({
|
|||||||
sx={{
|
sx={{
|
||||||
textTransform: 'none',
|
textTransform: 'none',
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
|
order: { xs: 1, sm: 2 },
|
||||||
}}
|
}}
|
||||||
endIcon={<Icon Component={Edit2} />}
|
endIcon={<Icon Component={Edit2} />}
|
||||||
onClick={onEditValue}
|
onClick={onEditValue}
|
||||||
|
|||||||
@@ -123,19 +123,25 @@ export function VerifyPhoneNumber({
|
|||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: { xs: 'column', sm: 'row' },
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
gap: 4,
|
gap: 4,
|
||||||
mb: 0.5,
|
mb: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h5">{t('verify.verify')}</Typography>
|
<Typography variant="h5" sx={{ order: { xs: 2, sm: 1 } }}>
|
||||||
|
{t('verify.verify')}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
size="large"
|
size="large"
|
||||||
sx={{ textTransform: 'lowercase', width: 'auto' }}
|
sx={{
|
||||||
|
textTransform: 'lowercase',
|
||||||
|
width: 'auto',
|
||||||
|
order: { xs: 1, sm: 2 },
|
||||||
|
}}
|
||||||
endIcon={<Icon Component={Edit2} />}
|
endIcon={<Icon Component={Edit2} />}
|
||||||
onClick={onEditValue}
|
onClick={onEditValue}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user