Passing props to MUI styles
Deleted the old answer, because it’s no reason for existence. Here’s what you want: import React from ‘react’; import { makeStyles } from ‘@material-ui/core’; const useStyles = makeStyles({ firstStyle: { backgroundColor: props => props.backgroundColor, }, secondStyle: { color: props => props.color, }, }); const MyComponent = ({children, …props}) =>{ const { firstStyle, secondStyle } = … Read more