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( componentOrTemplateRef: ComponentType | TemplateRef, config?: DialogConfig> ): DialogRef { config = { backdropClass: ["tw-fixed", "tw-bg-black", "tw-bg-opacity-30", "tw-inset-0", "tw-z-40"], ...config, }; return super.open(componentOrTemplateRef, config); } }