Migrate more-info-dialog to mwc and Lit (#6345)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Bram Kragten
2020-07-08 11:38:07 +02:00
committed by GitHub
parent e1cb549b28
commit b429fe8254
12 changed files with 385 additions and 480 deletions

View File

@@ -23,6 +23,12 @@ export const createCloseHeading = (hass: HomeAssistant, title: string) => html`
@customElement("ha-dialog")
export class HaDialog extends MwcDialog {
protected renderHeading() {
return html`<slot name="heading">
${super.renderHeading()}
</slot>`;
}
protected static get styles(): CSSResult[] {
return [
style,
@@ -43,6 +49,9 @@ export class HaDialog extends MwcDialog {
.mdc-dialog .mdc-dialog__content {
padding: var(--dialog-content-padding, 20px 24px);
}
.mdc-dialog .mdc-dialog__surface {
min-height: var(--mdc-dialog-min-height, auto);
}
.header_button {
position: absolute;
right: 16px;