Skip to content

Commit

Permalink
Add a cancel button
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed May 3, 2023
1 parent c94730b commit 6e4457a
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { showAlertDialog } from "../../../../../dialogs/generic/show-dialog-box"
import { createCloseHeading } from "../../../../../components/ha-dialog";
import { HomeAssistant } from "../../../../../types";
import "../../../../../components/buttons/ha-progress-button";
import "../../../../../components/ha-button";
import "../../../../../components/ha-select";
import "@material/mwc-list/mwc-list-item";
import { ZHAMigrateChannelDialogParams } from "./show-dialog-zha-migrate-channel";
Expand Down Expand Up @@ -87,7 +88,9 @@ class DialogZHAMigrateChannel extends LitElement implements HassDialog {
>
${VALID_CHANNELS.map(
(newChannel) =>
html`<mwc-list-item .value=${newChannel.toString()}
html`<mwc-list-item
name="newChannel"
.value=${newChannel.toString()}
>${newChannel}</mwc-list-item
>`
)}
Expand All @@ -104,6 +107,13 @@ class DialogZHAMigrateChannel extends LitElement implements HassDialog {
"ui.panel.config.zha.change_channel_dialog.change_channel"
)}
</ha-progress-button>
<ha-button
slot="secondaryAction"
@click=${this.closeDialog}
.disabled=${this._migrationInProgress}
>${this.hass.localize("ui.dialogs.generic.cancel")}</ha-button
>
</ha-dialog>
`;
}
Expand Down

0 comments on commit 6e4457a

Please sign in to comment.