Currently utilizing the Material UI next framework to construct a wrapper for the card component. This customized wrapper allows for personalization of the component. I have successfully extended the component so that the title and image within the card can be passed as props. However, I am facing a challenge in sending the background color as a prop since it is injected into the classes attribute using JS in CSS technique.
The styles defined with JSS are as follows:
const styles = {
card: {
maxWidth: 345,
backgroundColor: '#hexcodehere'
},
The structure of the component is displayed below:
const { classes,label } = props;
<Card className={classes.card}
label={label}
>
<CardText />
<CardMedia />
</Card>
Any ideas on how to set the background color using props would be much appreciated!