how to customize a material UI class style code example
Example 1: material ui common styles
// with npm
npm install @material-ui/styles
// with yarn
yarn add @material-ui/styles
Example 2: material ui common styles
const useStyles = makeStyles({
// style rule
foo: props => ({
backgroundColor: props.backgroundColor,
}),
bar: {
// CSS property
color: props => props.color,
},
});
function MyComponent() {
// Simulated props for the purpose of the example
const props = { backgroundColor: 'black', color: 'white' };
// Pass the props as the first argument of useStyles()
const classes = useStyles(props);
return
}