Add mobile layout to register screen and adjust login

This commit is contained in:
Leonardo Murça 2022-09-14 15:50:26 -03:00
parent be453c1156
commit fecf1e9901
3 changed files with 22 additions and 16 deletions

View file

@ -44,7 +44,7 @@ function View({
</Container> </Container>
</Box> </Box>
<Box sx={boxForm}> <Box sx={boxForm}>
<h1>Login</h1> <h1>Entrar</h1>
<p>Bem-vindo de volta. Faça o login digitando os dados abaixo.</p> <p>Bem-vindo de volta. Faça o login digitando os dados abaixo.</p>
<Stack spacing={4} component="form"> <Stack spacing={4} component="form">
<TextField <TextField

View file

@ -32,18 +32,12 @@ function View({
onChangeCheckbox, onChangeCheckbox,
onTryRegister, onTryRegister,
}) { }) {
const { paper, boxLogo, boxForm, logoContainer } = styles[layoutType]; const { container, paper, boxLogo, boxForm, logoContainer } =
styles[layoutType];
const currentYear = dayjs().year(); const currentYear = dayjs().year();
return ( return (
<Container <Container sx={container} disableGutters>
sx={{
height: 'auto',
margin: '0 auto',
padding: '100px 0',
}}
disableGutters
>
<Paper sx={paper} elevation={4} variant="elevation"> <Paper sx={paper} elevation={4} variant="elevation">
<Box sx={boxForm}> <Box sx={boxForm}>
<h1>Criar conta</h1> <h1>Criar conta</h1>

View file

@ -1,4 +1,10 @@
// ========== Desktop ========== // ========== Desktop ==========
const desktopContainer = {
height: 'auto',
margin: '0 auto',
padding: '100px 0',
};
const desktopPaper = { const desktopPaper = {
height: 'fit-content', height: 'fit-content',
display: 'flex', display: 'flex',
@ -38,6 +44,7 @@ const desktopBoxForm = {
const logoContainerDesktop = {}; const logoContainerDesktop = {};
const desktop = { const desktop = {
container: desktopContainer,
paper: desktopPaper, paper: desktopPaper,
boxLogo: desktopBoxLogo, boxLogo: desktopBoxLogo,
boxForm: desktopBoxForm, boxForm: desktopBoxForm,
@ -45,12 +52,15 @@ const desktop = {
}; };
// ========== Mobile ========== // ========== Mobile ==========
const mobileContainer = {
...desktopContainer,
padding: '100px 10px',
};
const mobilePaper = { const mobilePaper = {
...desktopPaper, ...desktopPaper,
flexDirection: 'column', flexDirection: 'column-reverse',
height: '700px', height: 'fit-content',
marginLeft: '10px',
marginRight: '10px',
}; };
const mobileBoxLogo = { const mobileBoxLogo = {
@ -61,8 +71,8 @@ const mobileBoxLogo = {
const mobileBoxForm = { const mobileBoxForm = {
...desktopBoxForm, ...desktopBoxForm,
padding: '0 15px', padding: '20px 15px',
width: 'fit-content', width: '100%',
}; };
const logoContainerMobile = { const logoContainerMobile = {
@ -70,6 +80,7 @@ const logoContainerMobile = {
}; };
const mobile = { const mobile = {
container: mobileContainer,
paper: mobilePaper, paper: mobilePaper,
boxLogo: mobileBoxLogo, boxLogo: mobileBoxLogo,
boxForm: mobileBoxForm, boxForm: mobileBoxForm,
@ -78,6 +89,7 @@ const mobile = {
// ========== Unset ========== // ========== Unset ==========
const unset = { const unset = {
container: null,
paper: null, paper: null,
boxLogo: null, boxLogo: null,
boxForm: null, boxForm: null,