Add close button to import blueprint dialog (#8802)

This commit is contained in:
Bram Kragten 2021-04-02 20:19:35 +02:00 committed by GitHub
parent d57cf93580
commit 61aaaabcb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,6 @@ import {
} from "lit-element"; } from "lit-element";
import { fireEvent } from "../../../common/dom/fire_event"; import { fireEvent } from "../../../common/dom/fire_event";
import "../../../components/ha-circular-progress"; import "../../../components/ha-circular-progress";
import "../../../components/ha-dialog";
import "../../../components/ha-expansion-panel"; import "../../../components/ha-expansion-panel";
import { import {
BlueprintImportResult, BlueprintImportResult,
@ -24,6 +23,7 @@ import {
} from "../../../data/blueprint"; } from "../../../data/blueprint";
import { haStyleDialog } from "../../../resources/styles"; import { haStyleDialog } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types"; import type { HomeAssistant } from "../../../types";
import { createCloseHeading } from "../../../components/ha-dialog";
@customElement("ha-dialog-import-blueprint") @customElement("ha-dialog-import-blueprint")
class DialogImportBlueprint extends LitElement { class DialogImportBlueprint extends LitElement {
@ -65,7 +65,10 @@ class DialogImportBlueprint extends LitElement {
<ha-dialog <ha-dialog
open open
@closed=${this.closeDialog} @closed=${this.closeDialog}
.heading=${this.hass.localize("ui.panel.config.blueprint.add.header")} .heading=${createCloseHeading(
this.hass,
this.hass.localize("ui.panel.config.blueprint.add.header")
)}
> >
<div> <div>
${this._error ? html` <div class="error">${this._error}</div> ` : ""} ${this._error ? html` <div class="error">${this._error}</div> ` : ""}