How to change the color of CardHeader Title
See original GitHub issueI cannot seem to be able to change the color of the CardHeader title text.
I have a ‘styles’ constant as follows:
const styles = theme => ({
loginCard: {
height: 200,
width: 300
},
loginCardHeader: {
backgroundColor: theme.palette.primary.main,
color: '#fff'
}
});
And my React.Component
as follows:
class Login extends React.Component {
render() {
const { classes, theme } = this.props;
return (
<div>
<Card className={classes.loginCard}>
<CardHeader className={classes.loginCardHeader} title='Login' />
</Card>
</div>
);
}
}
The backgroundColor
is applying to the CardHeader
via loginCardHeader
but the color
is not.
Tech | Version |
---|---|
Material-UI | 1.0.0-beta.38 |
React | 16.2.0 |
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How do you change the colour of the subheader in a material ...
The style I have applied seems to successfully change the CardHeader title but not the subheader? How can I get the subheader to...
Read more >CardHeader API - Material UI - MUI
API reference docs for the React CardHeader component. ... The name MuiCardHeader can be used when providing default props or style overrides in...
Read more >Card header background title - Material Design for Bootstrap
So for example in the code below I want to change the background colour where it says "Featured" to grey and the rest...
Read more >Material-UI Card Custom Background Color, Header, Content ...
In this demo we'll create a mobile responsive card and configure the card header, content, and footer background color.
Read more >Material UI CardHeader with All Props Enabled - YouTube
Do you want to build a full MUI app from beginning to end, learn every aspect of the sx prop, styled API, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, works fine in hooks too.