pharedata-ng-components
Version:
Angular alert/dialog component library with Material Design support
34 lines (33 loc) • 1.2 kB
TypeScript
import { MatDialog } from '@angular/material/dialog';
import * as i0 from "@angular/core";
export interface AlertConfig {
title?: string;
content?: string;
icon?: string;
acceptLabel?: string;
cancelLabel?: string;
acceptFunc?: () => void;
cancelFunc?: () => void;
closeFunc?: () => void;
showGreyBackground?: () => void;
hideGreyBackground?: () => void;
scrollTo?: (x: number, y: number) => void;
}
export declare class CustomAlert {
private dialog;
constructor(dialog: MatDialog);
/**
* Show an alert using the Material Dialog approach
*/
showAlert(acceptFunc?: () => void, cancelFunc?: () => void, closeFunc?: () => void, showGreyBackground?: () => void, hideGreyBackground?: () => void, scrollTo?: (x: number, y: number) => void, title?: string, content?: string, icon?: string, acceptLabel?: string, cancelLabel?: string): any;
/**
* Show grey background overlay
*/
showGreyBackground(): void;
/**
* Hide grey background overlay
*/
hideGreyBackground(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<CustomAlert, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<CustomAlert>;
}