Files
react-test/docs/data/material/getting-started/templates/dashboard/theme/customizations/treeView.js
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

62 lines
1.8 KiB
JavaScript

import { alpha } from '@mui/material/styles';
import { gray, brand } from '../../../shared-theme/themePrimitives';
/* eslint-disable import/prefer-default-export */
export const treeViewCustomizations = {
MuiTreeItem: {
styleOverrides: {
root: ({ theme }) => ({
position: 'relative',
boxSizing: 'border-box',
padding: theme.spacing(0, 1),
'& .groupTransition': {
marginLeft: theme.spacing(2),
padding: theme.spacing(0),
borderLeft: '1px solid',
borderColor: (theme.vars || theme).palette.divider,
},
'&:focus-visible .focused': {
outline: `3px solid ${alpha(brand[500], 0.5)}`,
outlineOffset: '2px',
'&:hover': {
backgroundColor: alpha(gray[300], 0.2),
outline: `3px solid ${alpha(brand[500], 0.5)}`,
outlineOffset: '2px',
},
},
}),
content: ({ theme }) => ({
marginTop: theme.spacing(1),
padding: theme.spacing(0.5, 1),
overflow: 'clip',
'&:hover': {
backgroundColor: alpha(gray[300], 0.2),
},
'&.selected': {
backgroundColor: alpha(gray[300], 0.4),
'&:hover': {
backgroundColor: alpha(gray[300], 0.6),
},
},
...theme.applyStyles('dark', {
'&:hover': {
backgroundColor: alpha(gray[500], 0.2),
},
'&:focus-visible': {
'&:hover': {
backgroundColor: alpha(gray[500], 0.2),
},
},
'&.selected': {
backgroundColor: alpha(gray[500], 0.4),
'&:hover': {
backgroundColor: alpha(gray[500], 0.6),
},
},
}),
}),
},
},
};