From 4ce3be9349b3a19bbc99b7bf783eafeec040b2f7 Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Fri, 1 Mar 2024 10:51:06 -0800 Subject: Update formatting on forms --- src/components/RsvpForm.tsx | 121 +++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 68 deletions(-) (limited to 'src/components') diff --git a/src/components/RsvpForm.tsx b/src/components/RsvpForm.tsx index 7beb21a..8c67139 100644 --- a/src/components/RsvpForm.tsx +++ b/src/components/RsvpForm.tsx @@ -1,5 +1,7 @@ import { + Box, Button, + Container, FormControl, FormControlLabel, FormLabel, @@ -17,17 +19,15 @@ function RsvpForm() { const [updateGuest] = useUpdateGuestMutation(); const guest: Guest = useOutletContext(); - const { register, handleSubmit, control, - formState: { errors } } = useForm({ + const { register, handleSubmit, control } = useForm({ defaultValues: { id: guest?.id, firstName: guest?.firstName, lastName: guest?.lastName, attendance: '', - meal: '', - restrictions: '', - plusOne: '', - advice: '' + email: '', + partySize: 1, + message: '' } }); @@ -36,8 +36,8 @@ function RsvpForm() { }; return ( -
- + + Date: April 14, 2025 @@ -47,82 +47,67 @@ function RsvpForm() { RSVP Deadline: - - - { errors && {errors.attendance?.message} } - Will you attend our wedding? - ( - - } - label="Yes" - /> - } - label="No" - /> - - )} - /> - - - - - { errors && {errors.meal?.message} } - Meal Preference - ( - - } - label="Beef" - /> - } - label="Chicken" - /> - - )} - /> + + + + Will you attend our wedding? + ( + + } + label="Yes" + /> + } + label="No" + /> + + )} + /> + - + - + - + - - + + + + - + ); } -- cgit v1.2.3