【发布时间】:2018-08-01 20:33:27
【问题描述】:
我在对话框中有三个按钮,如下所示:
JSX 是
<DialogActions classes={{ root: this.props.classes.dialogActionsRoot }} >
<Button classes={{ root: this.props.classes.buttonRoot }} size="small" onClick={() => this.props.handleDialogClose()} >
Clear
</Button>
<Button classes={{ root: this.props.classes.buttonRoot }} size="small" onClick={() => this.props.handleDialogClose()} >
Cancel
</Button>
<Button classes={{ root: this.props.classes.buttonRoot }} size="small" onClick={() => this.props.handleDialogClose(this.state.selectedValue)} >
Select
</Button>
</DialogActions>
'buttonRoot' 样式只是决定了按钮的颜色。如何左对齐“清除”按钮,使其位于左侧?似乎每个按钮都在一个带有 MuiDialogActions-action 类的 div 中。
【问题讨论】:
标签: javascript html css material-ui