UNPKG

@lhn/mat-alert

Version:

Implementation of MatDialog shown as an alert message

19 lines (18 loc) 798 B
import { MatDialog } from '@angular/material/dialog'; import { Observable } from 'rxjs'; import { MatAlertConfig } from './mat-alert-config.interface'; export declare class MatAlert { private dlg; private defaultConfigs; constructor(dlg: MatDialog, defaultConfigs: MatAlertConfig); /** * Opens an alert dialog * * @param title Title for the alert * @param message Message body. Can be an additional description * @param config Configuration for the alert * @param disableClose Flag for disable closing the alert clicking outside or pressing Escape * @return Observable<void> The MatDialog's `afterClosed()` observable */ show(title: string, message?: string, config?: Partial<MatAlertConfig>, disableClose?: boolean): Observable<void>; }