1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-15 06:57:58 +02:00
bitwarden-browser/libs/components/src/dialog/dialog.service.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
625 B
TypeScript
Raw Normal View History

2022-08-05 17:45:36 +02:00
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);
}
}