Skip to content

Commit 2849836

Browse files
committed
fixup! fix(material/dialog): css structure change
1 parent 2ae48eb commit 2849836

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/material/dialog/dialog.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
175175
// the title, contents, and actions are then nested directly under the
176176
// dialog surface.
177177
if (!(componentOrTemplateRef instanceof TemplateRef)) {
178-
this._appendPanelClass(config);
178+
this._appendPanelClass(config, 'mat-mdc-dialog-component-panel');
179179
}
180180

181181
const cdkRef = this._dialog.open<R, D, T>(componentOrTemplateRef, {
@@ -266,13 +266,14 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
266266
}
267267
}
268268

269-
private _appendPanelClass(config: MatDialogConfig) {
269+
/** Appends the given class name to the panel via the dialog config. */
270+
private _appendPanelClass(config: MatDialogConfig, className: string) {
270271
if (Array.isArray(config.panelClass)) {
271-
config.panelClass.push('mat-mdc-dialog-component-panel');
272+
config.panelClass.push(className);
272273
} else if (typeof config.panelClass === 'string') {
273-
config.panelClass = [config.panelClass, 'mat-mdc-dialog-component-panel'];
274+
config.panelClass = [config.panelClass, className];
274275
} else {
275-
config.panelClass = 'mat-mdc-dialog-component-panel';
276+
config.panelClass = className;
276277
}
277278
}
278279
}

0 commit comments

Comments
 (0)