Migrate all paper dialogs to mwc (#10333)

This commit is contained in:
Bram Kragten
2021-10-19 22:56:49 +02:00
committed by GitHub
parent b1e6935df9
commit 7488eb782d
27 changed files with 230 additions and 691 deletions

View File

@@ -24,7 +24,7 @@ export const createCloseHeading = (
// @ts-expect-error
export class HaDialog extends Dialog {
public scrollToPos(x: number, y: number) {
this.contentElement.scrollTo(x, y);
this.contentElement?.scrollTo(x, y);
}
protected renderHeading() {
@@ -44,6 +44,12 @@ export class HaDialog extends Dialog {
justify-content: var(--justify-action-buttons, flex-end);
padding-bottom: max(env(safe-area-inset-bottom), 8px);
}
.mdc-dialog__actions span:nth-child(1) {
flex: var(--secondary-action-button-flex, unset);
}
.mdc-dialog__actions span:nth-child(2) {
flex: var(--primary-action-button-flex, unset);
}
.mdc-dialog__container {
align-items: var(--vertial-align-dialog, center);
}