1
0
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:
Oscar Hinton
2022-08-05 17:45:36 +02:00
committed by GitHub
parent e7220644d1
commit 762fac062f
19 changed files with 338 additions and 217 deletions

View 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);
}
}