Use DialogButtons in AddressSelector
Use DialogButtons to eliminate duplicate button code.
This commit is contained in:
parent
3b2c61e456
commit
0f6125e749
1 changed files with 4 additions and 5 deletions
|
@ -507,6 +507,7 @@ module.exports = 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');
|
||||||
const AddressSelector = sdk.getComponent("elements.AddressSelector");
|
const AddressSelector = sdk.getComponent("elements.AddressSelector");
|
||||||
this.scrollElement = null;
|
this.scrollElement = null;
|
||||||
|
|
||||||
|
@ -590,11 +591,9 @@ module.exports = React.createClass({
|
||||||
{ addressSelector }
|
{ addressSelector }
|
||||||
{ this.props.extraNode }
|
{ this.props.extraNode }
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_Dialog_buttons">
|
<DialogButtons primaryButton={this.props.button}
|
||||||
<button className="mx_Dialog_primary" onClick={this.onButtonClick}>
|
onPrimaryButtonClick={this.onButtonClick}
|
||||||
{ this.props.button }
|
onCancel={this.onCancel} />
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue