【发布时间】:2017-08-09 09:00:43
【问题描述】:
如何禁用 materiul-ui 按钮 RaisedButton 的覆盖。
我有一个模态窗口,当我打开它时 - 按钮仍然显示。
我应该向按钮添加什么属性来禁用覆盖?
请谁使用material-ui,帮助。
我尝试将 z-index 用于按钮的容器,但没有帮助
【问题讨论】:
-
请添加一些相关代码
标签: css reactjs material-ui
如何禁用 materiul-ui 按钮 RaisedButton 的覆盖。
我有一个模态窗口,当我打开它时 - 按钮仍然显示。
我应该向按钮添加什么属性来禁用覆盖?
请谁使用material-ui,帮助。
我尝试将 z-index 用于按钮的容器,但没有帮助
【问题讨论】:
标签: css reactjs material-ui
我在按钮上添加了z-index和position,现在可以了。
<div className={styles.watch__button}>
<RaisedButton
onClick={buttonRole}
backgroundColor={timerButtonColor}
style={{zIndex: 0, position: 'relative'}}>
<div className={styles.watch__button__text}>{buttonName}</div>
</RaisedButton>
</div>
<div className={styles.watch__button}>
<RaisedButton
onClick={this.handleShowCalendar}
backgroundColor={genButtonColor}
style={{zIndex: 0, position: 'relative'}}>
<div className={styles.watch__button__text}>Generate</div>
</RaisedButton>
</div>
<Modal
isOpen={showCalendar} >
<button onClick={this.handleShowCalendar}>close</button>
<h1>Modal Content</h1>
</Modal >
也许有人知道如何用类来制作它,因为它只适用于样式
【讨论】: