Update Priorities with color properties

This commit is contained in:
Mo Tarbin 2024-11-17 19:20:12 -05:00
parent fa767d16cb
commit 493edd5c82
2 changed files with 14 additions and 0 deletions

View file

@ -10,21 +10,25 @@ const Priorities = [
name: 'P4', name: 'P4',
value: 4, value: 4,
icon: <HorizontalRule />, icon: <HorizontalRule />,
color: '',
}, },
{ {
name: 'P3 ', name: 'P3 ',
value: 3, value: 3,
icon: <KeyboardControlKey />, icon: <KeyboardControlKey />,
color: '',
}, },
{ {
name: 'P2', name: 'P2',
value: 2, value: 2,
icon: <KeyboardDoubleArrowUp />, icon: <KeyboardDoubleArrowUp />,
color: 'warning',
}, },
{ {
name: 'P1', name: 'P1',
value: 1, value: 1,
icon: <PriorityHigh />, icon: <PriorityHigh />,
color: 'danger',
}, },
] ]

View file

@ -330,16 +330,26 @@ const ChoreView = () => {
<Menu> <Menu>
{Priorities.map((priority, index) => ( {Priorities.map((priority, index) => (
<MenuItem <MenuItem
sx={{
pr: 1,
py: 1,
}}
key={index} key={index}
onClick={() => { onClick={() => {
handleUpdatePriority(priority) handleUpdatePriority(priority)
}} }}
color={priority.color}
> >
{priority.icon}
{priority.name} {priority.name}
</MenuItem> </MenuItem>
))} ))}
<Divider /> <Divider />
<MenuItem <MenuItem
sx={{
pr: 1,
py: 1,
}}
onClick={() => { onClick={() => {
handleUpdatePriority({ handleUpdatePriority({
name: 'No Priority', name: 'No Priority',