ManageEventIndexDialog: Override the Disable button class to be danger.

pull/21833/head
Damir Jelić 2020-01-24 16:47:29 +01:00
parent 5d3b916a89
commit 3208ac60c7
1 changed files with 9 additions and 12 deletions

View File

@ -132,18 +132,8 @@ export default class ManageEventIndexDialog extends React.Component {
</div>
);
const buttons = (
<div className="mx_Dialog_buttons">
<AccessibleButton kind="danger" onClick={this._onDisable}>
{_t("Disable")}
</AccessibleButton>
<AccessibleButton kind="primary" onClick={this._onDone}>
{_t("Done")}
</AccessibleButton>
</div>
);
const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog');
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
return (
<BaseDialog className='mx_ManageEventIndexDialog'
@ -151,7 +141,14 @@ export default class ManageEventIndexDialog extends React.Component {
title={_t("Message search")}
>
{eventIndexingSettings}
{buttons}
<DialogButtons
primaryButton={_t("Done")}
onPrimaryButtonClick={this.props.onFinished}
primaryButtonClass="primary"
cancelButton={_t("Disable")}
onCancel={this._onDisable}
cancelButtonClass="danger"
/>
</BaseDialog>
);
}