Kus*_*ain 0 overriding dialog inline-styles reactjs material-ui
我正在使用 material-ui ReactJs 中的 Dialog 组件。
<Dialog fullScreen open={this.state.open}
PaperProps={{ classes: {root: classes.dialogPaper} }}
onClose={this.handleClose.bind(this)} transition={this.props.transition}>
{this.props.children}
</Dialog>
Run Code Online (Sandbox Code Playgroud)
在上面的代码中,我已经覆盖了 PaperProps 的根类。现在我还想覆盖 PaperProps 中的样式。在 PaperProps 中是否可以覆盖样式。
就像是 PaperProps={{ classes: {root: classes.dialogPaper}, style:{} }}
如果我错了,请告诉我。我也想覆盖样式。
我得到了答案
<Dialog
{...otherProps}
PaperProps={{
style: {
backgroundColor: 'transparent',
boxShadow: 'none',
},
}}
>
{/* ... your content ... */}
</Dialog>
Run Code Online (Sandbox Code Playgroud)
这就是我们如何在对话框组件的 PaperProps 中放置样式。
归档时间: |
|
查看次数: |
8279 次 |
最近记录: |