mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-05 17:09:48 +00:00
Add close button when not confirmation/alert dialog
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { mdiAlertOutline } from "@mdi/js";
|
import { mdiAlertOutline, mdiClose } from "@mdi/js";
|
||||||
import { css, html, LitElement, nothing } from "lit";
|
import { css, html, LitElement, nothing } from "lit";
|
||||||
import { customElement, property, query, state } from "lit/decorators";
|
import { customElement, property, query, state } from "lit/decorators";
|
||||||
import { ifDefined } from "lit/directives/if-defined";
|
import { ifDefined } from "lit/directives/if-defined";
|
||||||
@@ -70,6 +70,15 @@ class DialogBox extends LitElement {
|
|||||||
aria-describedby="dialog-box-description"
|
aria-describedby="dialog-box-description"
|
||||||
>
|
>
|
||||||
<ha-dialog-header slot="header">
|
<ha-dialog-header slot="header">
|
||||||
|
${!confirmPrompt
|
||||||
|
? html`<slot name="headerNavigationIcon" slot="navigationIcon">
|
||||||
|
<ha-icon-button
|
||||||
|
data-dialog="close"
|
||||||
|
.label=${this.hass?.localize("ui.common.close") ?? "Close"}
|
||||||
|
.path=${mdiClose}
|
||||||
|
></ha-icon-button
|
||||||
|
></slot>`
|
||||||
|
: nothing}
|
||||||
<span slot="title" id="dialog-box-title">
|
<span slot="title" id="dialog-box-title">
|
||||||
${this._params.warning
|
${this._params.warning
|
||||||
? html`<ha-svg-icon
|
? html`<ha-svg-icon
|
||||||
|
|||||||
Reference in New Issue
Block a user