From 93b789438b90888006d714a8e9cd07dc71a9a598 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Sat, 23 Dec 2017 16:15:53 +1300 Subject: [PATCH] Use DialogButtons in ConfirmUserActionDialog Use DialogButtons to eliminate duplicate button code. --- .../views/dialogs/ConfirmUserActionDialog.js | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/components/views/dialogs/ConfirmUserActionDialog.js b/src/components/views/dialogs/ConfirmUserActionDialog.js index 78d084b709..91d2b342a4 100644 --- a/src/components/views/dialogs/ConfirmUserActionDialog.js +++ b/src/components/views/dialogs/ConfirmUserActionDialog.js @@ -76,13 +76,11 @@ export default React.createClass({ render: function() { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); + const DialogButtons = sdk.getComponent('views.elements.DialogButtons'); const MemberAvatar = sdk.getComponent("views.avatars.MemberAvatar"); const BaseAvatar = sdk.getComponent("views.avatars.BaseAvatar"); - const confirmButtonClass = classnames({ - 'mx_Dialog_primary': true, - 'danger': this.props.danger, - }); + const confirmButtonClass = this.props.danger ? 'danger' : ''; let reasonBox; if (this.props.askReason) { @@ -127,17 +125,11 @@ export default React.createClass({
{ userId }
{ reasonBox } -
- - - -
+ ); },