1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| const CustomTreeItem = styled(TreeItem)(({ theme }) => ({
color: theme.palette.grey[200],
[`& .${treeItemClasses.content}`]: {
borderRadius: theme.spacing(0.5),
padding: theme.spacing(0.5, 1),
margin: theme.spacing(0.2, 0),
[`& .${treeItemClasses.label}`]: {
fontSize: '0.8rem',
fontWeight: 500,
},
},
[`& .${treeItemClasses.iconContainer}`]: {
borderRadius: '50%',
backgroundColor: theme.palette.primary.dark,
padding: theme.spacing(0, 1.2),
...theme.applyStyles('light', {
backgroundColor: alpha(theme.palette.primary.main, 0.25),
}),
...theme.applyStyles('dark', {
color: theme.palette.primary.contrastText,
}),
},
[`& .${treeItemClasses.groupTransition}`]: {
marginLeft: 15,
paddingLeft: 18,
borderLeft: `1px dashed ${alpha(theme.palette.text.primary, 0.4)}`,
},
...theme.applyStyles('light', {
color: theme.palette.grey[800],
}),
})); |
Partager