[英]capitalize the first letter in a word for a normal state
https://codesandbox.io/s/2pomwq2z20
const styles = theme => ({
root: {
flexGrow: 1,
width: "100%",
backgroundColor: theme.palette.background.paper
},
tabsIndicator: {
backgroundColor: "red",
textTransform: "capitalize"
},
tabRoot: {
"&:hover": {
color: "red",
opacity: 1,
textTransform: "capitalize"
},
"&$tabSelected": {
color: "red",
fontWeight: theme.typography.fontWeightMedium,
textTransform: "capitalize"
},
"&:focus": {
color: "red",
textTransform: "capitalize"
}
},
tabSelected: {}
});
您需要在tabRoot中添加textTransform: "initial"
。 查看https://codesandbox.io/s/p5z9m029v0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.