given card code as in here : card
how can I update the card style or any material UI style as from
const styles = theme => ({
card: {
minWidth: 275,
},
to such follows:
const styles = theme => ({
card: {
minWidth: 275, backgroundColor: props.color },
when I tried the latest one, I got
Line 15: 'props' is not defined no-undef
when I updated code to be :
const styles = theme => (props) => ({
card: {
minWidth: 275, backgroundColor: props.color },
also
const styles = (theme ,props) => ({
card: {
minWidth: 275, backgroundColor: props.color },
instead of
const styles = theme => ({
card: {
minWidth: 275, backgroundColor: props.color },
I got the component card style at the web page messy.
By the way, I pass props as follows:
<SimpleCard backgroundColor="#f5f2ff" />
please help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…