UNPKG

ngx-snackbar

Version:

Snackbar implementation in Angular 7.

38 lines (37 loc) 1.08 kB
import { EventEmitter } from '@angular/core'; import { SnackbarService } from '../service/snackbar.service'; export declare class SnackbarComponent { private snackbarService; position: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; max: number; background: string; accent: string; color: string; customClass: any; timeout: number; onAdd: EventEmitter<any>; onRemove: EventEmitter<any>; onClear: EventEmitter<boolean>; snacks: Array<{ id: string; msg: string; timeout?: number; color?: string; background?: string; customClass?: any; action?: { text: string; onClick?: Function; color?: string; }; onAdd?: Function; onRemove?: Function; timeoutObj?: any; }>; constructor(snackbarService: SnackbarService); add(snack: any): void; remove(id: any): void; clear(): void; uuid(): string; calcTextColor(background: any): "#000" | "#fff" | null; }