我需要白色铅笔图标,我需要:
<CreateIcon style={{ color: white[500] }} />
但是“白色”在 Material UI 中不存在 https://material-ui.com/customization/color/#official-color-tool
如何使用白色?
最佳答案
最简单的几种方法是:
1)
<CreateIcon style={{ color: '#fff' }} />
或
2)
const useStyles = makeStyles((theme) => ({
white: {
color: theme.palette.common.white,
},
}
在您的组件中:
const classes = useStyles();
..
<CreateIcon className={classes.white}/>
关于reactjs - 如何为 Material UI 图标应用白色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63742207/