【发布时间】:2019-12-23 16:23:09
【问题描述】:
我想更改材质 UI TextField 组件在获得焦点时的边框颜色,而不使用包装整个应用程序的主题。
我在我的项目中使用样式化组件和 nextjs,official documentation 没有领先任何地方。
我检查了 TextField 并尝试通过处理类来直接应用更改。没有任何影响。
const StyledInput = styled(TextField)`
width: 100%;
&.MuiInputLabel-root.Mui-focused {
color: white;
}
`;
【问题讨论】:
标签: material-ui styled-components