mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[CL-46] Dialogs (#3237)
This commit is contained in:
18
libs/components/src/dialog/dialog.service.ts
Normal file
18
libs/components/src/dialog/dialog.service.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Dialog, DialogConfig, DialogRef } from "@angular/cdk/dialog";
|
||||
import { ComponentType } from "@angular/cdk/overlay";
|
||||
import { Injectable, TemplateRef } from "@angular/core";
|
||||
|
||||
@Injectable()
|
||||
export class DialogService extends Dialog {
|
||||
override open<R = unknown, D = unknown, C = unknown>(
|
||||
componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,
|
||||
config?: DialogConfig<D, DialogRef<R, C>>
|
||||
): DialogRef<R, C> {
|
||||
config = {
|
||||
backdropClass: ["tw-fixed", "tw-bg-black", "tw-bg-opacity-30", "tw-inset-0", "tw-z-40"],
|
||||
...config,
|
||||
};
|
||||
|
||||
return super.open(componentOrTemplateRef, config);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user