Skip to content

Commit

Permalink
Merge pull request #3118 from Northeastern-Electric-Racing/#3117-fix-…
Browse files Browse the repository at this point in the history
…checklist-modals

#3117 fix checklist modals
  • Loading branch information
Aaryan1203 authored Jan 10, 2025
2 parents 1febe1f + a40fb96 commit a05c93f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,18 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
render={({ field }) => (
<TextField
{...field}
placeholder="Description"
placeholder="Enter description..."
fullWidth
multiline
variant="outlined"
InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton onClick={() => remove(index)}>
<RemoveCircleOutlineIcon sx={{ color: 'white' }} />
</IconButton>
{index !== 0 && (
<IconButton onClick={() => remove(index)}>
<RemoveCircleOutlineIcon sx={{ color: 'white' }} />
</IconButton>
)}
</InputAdornment>
),
disableUnderline: true,
Expand All @@ -284,7 +286,11 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
backgroundColor: theme.palette.background.paper,
borderRadius: 5,
mt: 1,
width: '100%'
width: '100%',
...(index === 0 && {
minHeight: '150px',
fontSize: '1.25rem'
})
}}
error={!!errors.descriptions?.[index]?.name}
helperText={errors.descriptions?.[index]?.name?.message}
Expand All @@ -293,6 +299,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
/>
</Box>
))}

<IconButton
onClick={() => append({ name: '' })}
sx={{
Expand All @@ -306,7 +313,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
}}
>
<AddCircleOutlineIcon sx={{ color: theme.palette.text.primary, mr: 1 }} />
Add Description
Add Additional Information
</IconButton>
</Box>
</FormControl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,18 @@ const EditChecklistModal = ({ open, handleClose, defaultValues, teamId, teamType
render={({ field }) => (
<TextField
{...field}
placeholder="Description"
placeholder="Enter description..."
fullWidth
multiline
variant="outlined"
InputProps={{
endAdornment: (
<InputAdornment position="end">
<IconButton onClick={() => remove(index)}>
<RemoveCircleOutlineIcon sx={{ color: 'white' }} />
</IconButton>
{index !== 0 && (
<IconButton onClick={() => remove(index)}>
<RemoveCircleOutlineIcon sx={{ color: 'white' }} />
</IconButton>
)}
</InputAdornment>
),
disableUnderline: true,
Expand All @@ -173,7 +175,11 @@ const EditChecklistModal = ({ open, handleClose, defaultValues, teamId, teamType
backgroundColor: theme.palette.background.paper,
borderRadius: 5,
mt: 1,
width: '100%'
width: '100%',
...(index === 0 && {
minHeight: '150px',
fontSize: '1.25rem'
})
}}
error={!!errors.descriptions?.[index]?.name}
helperText={errors.descriptions?.[index]?.name?.message}
Expand All @@ -195,7 +201,7 @@ const EditChecklistModal = ({ open, handleClose, defaultValues, teamId, teamType
}}
>
<AddCircleOutlineIcon sx={{ color: theme.palette.text.primary, mr: 1 }} />
Add Description
Add Additional Information
</IconButton>
</Box>
</FormControl>
Expand Down

0 comments on commit a05c93f

Please sign in to comment.