ManageEventIndexDialog: Override the Disable button class to be danger.

This commit is contained in:
Damir Jelić 2020-01-24 16:47:29 +01:00
parent 5d3b916a89
commit 3208ac60c7

View File

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