Use DialogButtons in CreateRoomDialog
Use DialogButtons to eliminate duplicate button code.
This commit is contained in:
parent
0f6125e749
commit
c863dbfc76
1 changed files with 4 additions and 8 deletions
|
@ -41,6 +41,7 @@ export default React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
|
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
|
||||||
|
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
|
||||||
return (
|
return (
|
||||||
<BaseDialog className="mx_CreateRoomDialog" onFinished={this.props.onFinished}
|
<BaseDialog className="mx_CreateRoomDialog" onFinished={this.props.onFinished}
|
||||||
onEnterPressed={this.onOk}
|
onEnterPressed={this.onOk}
|
||||||
|
@ -67,14 +68,9 @@ export default React.createClass({
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_Dialog_buttons">
|
<DialogButtons primaryButton={_t('Create Room')}
|
||||||
<button onClick={this.onCancel}>
|
onPrimaryButtonClick={this.onOk}
|
||||||
{ _t('Cancel') }
|
onCancel={this.onCancel} />
|
||||||
</button>
|
|
||||||
<button className="mx_Dialog_primary" onClick={this.onOk}>
|
|
||||||
{ _t('Create Room') }
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue