Update Priorities with color properties
This commit is contained in:
parent
fa767d16cb
commit
493edd5c82
2 changed files with 14 additions and 0 deletions
|
@ -10,21 +10,25 @@ const Priorities = [
|
|||
name: 'P4',
|
||||
value: 4,
|
||||
icon: <HorizontalRule />,
|
||||
color: '',
|
||||
},
|
||||
{
|
||||
name: 'P3 ',
|
||||
value: 3,
|
||||
icon: <KeyboardControlKey />,
|
||||
color: '',
|
||||
},
|
||||
{
|
||||
name: 'P2',
|
||||
value: 2,
|
||||
icon: <KeyboardDoubleArrowUp />,
|
||||
color: 'warning',
|
||||
},
|
||||
{
|
||||
name: 'P1',
|
||||
value: 1,
|
||||
icon: <PriorityHigh />,
|
||||
color: 'danger',
|
||||
},
|
||||
]
|
||||
|
||||
|
|
|
@ -330,16 +330,26 @@ const ChoreView = () => {
|
|||
<Menu>
|
||||
{Priorities.map((priority, index) => (
|
||||
<MenuItem
|
||||
sx={{
|
||||
pr: 1,
|
||||
py: 1,
|
||||
}}
|
||||
key={index}
|
||||
onClick={() => {
|
||||
handleUpdatePriority(priority)
|
||||
}}
|
||||
color={priority.color}
|
||||
>
|
||||
{priority.icon}
|
||||
{priority.name}
|
||||
</MenuItem>
|
||||
))}
|
||||
<Divider />
|
||||
<MenuItem
|
||||
sx={{
|
||||
pr: 1,
|
||||
py: 1,
|
||||
}}
|
||||
onClick={() => {
|
||||
handleUpdatePriority({
|
||||
name: 'No Priority',
|
||||
|
|
Loading…
Add table
Reference in a new issue