@mui/codemod
Version:
Codemod scripts for Material UI.
17 lines (16 loc) • 829 B
JavaScript
;
var _colorManipulator = require("@mui/system/colorManipulator");
const ComplexComponent = styled('div')(({
theme
}) => ({
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / 0.1)` : (0, _colorManipulator.alpha)(theme.palette.primary.main, 0.1),
border: `2px solid ${(0, _colorManipulator.lighten)(theme.palette.primary.main, 0.5)}`,
'&:hover': {
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / 0.2)` : (0, _colorManipulator.alpha)(theme.palette.primary.main, 0.2),
borderColor: (0, _colorManipulator.darken)(theme.palette.primary.main, 0.2)
},
'&:active': {
backgroundColor: (0, _colorManipulator.darken)(theme.palette.primary.dark, 0.1),
color: (0, _colorManipulator.lighten)(theme.palette.primary.contrastText, 0.3)
}
}));