diff --git a/angular/projects/catalyst-demo/src/app/app.component.ts b/angular/projects/catalyst-demo/src/app/app.component.ts index 78ead83a..339f23d7 100644 --- a/angular/projects/catalyst-demo/src/app/app.component.ts +++ b/angular/projects/catalyst-demo/src/app/app.component.ts @@ -178,6 +178,8 @@ export class AppComponent implements OnInit { } openDialog() { - this.dialog.open(DialogComponent); + this.dialog.open(DialogComponent, { + panelClass: ['cat-panel'] + }); } } diff --git a/angular/projects/catalyst/src/lib/dialog/dialog.service.ts b/angular/projects/catalyst/src/lib/dialog/dialog.service.ts index efdaa10a..3d581a26 100644 --- a/angular/projects/catalyst/src/lib/dialog/dialog.service.ts +++ b/angular/projects/catalyst/src/lib/dialog/dialog.service.ts @@ -45,13 +45,13 @@ export class CatDialogService { const panelClass = config?.panelClass ?? []; return this.dialog.open(component, { backdropClass: 'cat-backdrop', - panelClass: ['cat-dialog-pane', ...(Array.isArray(panelClass) ? panelClass : [panelClass])], width: '600px', minWidth: 'clamp(240px, 100vw - 16px, 320px)', minHeight: 'clamp(144px, 100vh - 16px, 160px)', maxHeight: 'calc(100vh - 64px)', maxWidth: 'calc(100vw - 64px)', - ...config + ...config, + panelClass: ['cat-dialog-pane', ...(Array.isArray(panelClass) ? panelClass : [panelClass])] }); }