material ui: how to change fontSize in Lists?
For mui v5, use primaryTypographyProps
prop to pass desired styles
<ListItemText
primaryTypographyProps={{fontSize: '18px'}}
primary="List Text"
/>
As the docs of ListItemText says you can override the primary
text styles using classes
props and primary
key.
Create a style
const styles = theme => ({
listItemText:{
fontSize:'0.7em',//Insert your required size
}
});
Apply the style to ListItemText
<ListItemText
classes={{primary:classes.listItemText}}
primary="Inbox" />
If you want to override the secondary font size apply styles to secondary key.