Skip to content

Commit

Permalink
fix(angular): fix panel class config with default class
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Sielemann committed Oct 16, 2024
1 parent 26b8791 commit a51cdac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion angular/projects/catalyst-demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ export class AppComponent implements OnInit {
}

openDialog() {
this.dialog.open(DialogComponent);
this.dialog.open(DialogComponent, {
panelClass: ['cat-panel']
});
}
}
4 changes: 2 additions & 2 deletions angular/projects/catalyst/src/lib/dialog/dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ export class CatDialogService {
const panelClass = config?.panelClass ?? [];
return this.dialog.open<R, D>(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])]
});
}

Expand Down

0 comments on commit a51cdac

Please sign in to comment.