I have a Material UI Card which has a dark background colour, so I need the text to be white. The style I have applied seems to successfully change the CardHeader title but not the subheader? How can I get the subheader to also change to white?
My code is as below:
const useStyles = makeStyles(theme => ({
menuColor: {
backgroundColor: theme.palette.primary.main,
color: '#ffffff',
},
}));
const ProfileUser = () => {
const classes = useStyles();
return (
<Card elevation={0} className={classes.menuColor}>
<CardHeader
avatar={<Avatar />}
title="Person name"
titleTypographyProps="h4"
subheaderTypographyProps="body1"
subheader="Person role"
/>
</Card>
);
};
export default ProfileUser;