nextjs material ui styles code example
Example 1: material ui common styles
import { makeStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/styles';
Example 2: material ui common styles
const useStyles = makeStyles({
foo: props => ({
backgroundColor: props.backgroundColor,
}),
bar: {
color: props => props.color,
},
});
function MyComponent() {
const props = { backgroundColor: 'black', color: 'white' };
const classes = useStyles(props);
return <div className={`${classes.foo} ${classes.bar}`} />
}