【发布时间】:2021-09-21 15:45:07
【问题描述】:
我对 css 很陌生,在这里我有点困惑。我正在使用带有 react 和 redux 的材料 ui。我想以某种方式编辑特定组件的某些属性。例如,假设我们使用具有 disabled 属性的 TextField。正如我所看到的,禁用的属性包含这些属性(我从文本字段中的材料 ui 节点模块中看到了)。
var styles = {
root: {
borderTop: 'none',
borderLeft: 'none',
borderRight: 'none',
borderBottomStyle: 'solid',
borderBottomWidth: 1,
borderColor: borderColor,
bottom: 8,
boxSizing: 'content-box',
margin: 0,
position: 'absolute',
width: '100%'
},
disabled: {
borderBottomStyle: 'dotted',
borderBottomWidth: 2,
borderColor: disabledTextColor
},
但我不希望在禁用borderBottomLine 时被点缀。我想将其更改为隐藏。如何在不影响框架代码的情况下进行这样的操作?
【问题讨论】:
标签: css reactjs material-ui