mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
SPRINT-18: fixed pie chart dot colors
This commit is contained in:
@ -82,8 +82,18 @@ const MDBadgeDot: FC<Props> = forwardRef(
|
|||||||
"dark",
|
"dark",
|
||||||
];
|
];
|
||||||
|
|
||||||
const validColorIndex = validColors.findIndex((el) => el === color);
|
const colorValues = {
|
||||||
|
"primary": "#e91e63",
|
||||||
|
"secondary": "#7b809a",
|
||||||
|
"info": "#04aaef",
|
||||||
|
"success": "#4CAF50",
|
||||||
|
"warning": "#fb8c00",
|
||||||
|
"error": "#F44335",
|
||||||
|
"light": "#f0f2f5",
|
||||||
|
"dark": "#344767"
|
||||||
|
} as any;
|
||||||
|
|
||||||
|
const validColorIndex = validColors.findIndex((el) => el === color);
|
||||||
return (
|
return (
|
||||||
<Box ref={ref} display="flex" alignItems="center" p={padding} {...rest}>
|
<Box ref={ref} display="flex" alignItems="center" p={padding} {...rest}>
|
||||||
<Box
|
<Box
|
||||||
@ -93,7 +103,7 @@ const MDBadgeDot: FC<Props> = forwardRef(
|
|||||||
height={finalSize}
|
height={finalSize}
|
||||||
borderRadius="50%"
|
borderRadius="50%"
|
||||||
mr={1}
|
mr={1}
|
||||||
sx={{backgroundColor: validColors[validColorIndex]}}
|
sx={{backgroundColor: colorValues[color]}}
|
||||||
/>
|
/>
|
||||||
<MDTypography
|
<MDTypography
|
||||||
variant={fontSize}
|
variant={fontSize}
|
||||||
|
Reference in New Issue
Block a user