diff options
author | Michael Hunteman <michael@huntm.net> | 2024-03-01 10:51:06 -0800 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-03-01 10:55:19 -0800 |
commit | 4ce3be9349b3a19bbc99b7bf783eafeec040b2f7 (patch) | |
tree | 110714e10aac71fcb8cd813f56f3cca1ea05e0cd /src/features | |
parent | 4acea48076f6f90267fea85c937a3fe79609270c (diff) |
Update formatting on forms
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/auth/GuestLogin.tsx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/features/auth/GuestLogin.tsx b/src/features/auth/GuestLogin.tsx index 61a8fa1..1f228d8 100644 --- a/src/features/auth/GuestLogin.tsx +++ b/src/features/auth/GuestLogin.tsx @@ -1,6 +1,6 @@ import { useNavigate } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import { Button, Stack, TextField, Typography } from '@mui/material'; +import { Box, Button, Container, TextField, Typography } from '@mui/material'; import { useForm } from 'react-hook-form'; import { setCredentials } from './authSlice'; import { useLoginMutation, LoginRequest } from '../../apiSlice'; @@ -28,28 +28,37 @@ function GuestLogin() { }; return ( - <form onSubmit={handleSubmit(onSubmit)}> - <Stack spacing={2}> + <Container component="form" maxWidth="xs" onSubmit={handleSubmit(onSubmit)}> + <Box sx={{ mt: 8, display: 'flex', flexDirection: 'column', alignItems: 'center' }}> <Typography variant="h6"> Guest Login </Typography> <TextField label="First Name" variant="outlined" + margin="normal" + fullWidth required {...register("firstName", { required: true })} /> <TextField label="Last Name" variant="outlined" + margin="normal" + fullWidth required {...register("lastName", { required: true })} /> - <Button type="submit" variant="contained" disabled={!isDirty || !isValid}> + <Button + type="submit" + variant="contained" + fullWidth + sx={{ mt: 2 }} + disabled={!isDirty || !isValid}> Login </Button> - </Stack> - </form> + </Box> + </Container> ); } |