UNPKG

ngx-toasta

Version:

Simple and clean Angular Toast component that shows growl-style notifications and messages for your web app

50 lines (49 loc) 1.73 kB
import { OnInit } from '@angular/core'; import { ToastaService, ToastData, ToastaConfig } from './toasta.service'; import * as i0 from "@angular/core"; /** * Toasta is container for Toast components */ export declare class ToastaComponent implements OnInit { private config; private toastaService; /** * Set of constants defines position of Toasta on the page. */ static POSITIONS: Array<string>; private _position; set position(value: string); get position(): string; toasts: Array<ToastData>; constructor(config: ToastaConfig, toastaService: ToastaService); /** * `ngOnInit` is called right after the directive's data-bound properties have been checked for the * first time, and before any of its children have been checked. It is invoked only once when the * directive is instantiated. */ ngOnInit(): void; /** * Event listener of 'closeToast' event comes from ToastaComponent. * This method removes ToastComponent assosiated with this Toast. */ closeToast(toast: ToastData): void; /** * Add new Toast */ add(toast: ToastData): void; /** * Clear individual toast by id * @param id is unique identifier of Toast */ clear(id: number): void; /** * Clear all toasts */ clearAll(): void; /** * Custom setTimeout function for specific setTimeouts on individual toasts. */ private _setTimeout; static ɵfac: i0.ɵɵFactoryDeclaration<ToastaComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ToastaComponent, "ngx-toasta", never, { "position": "position"; }, {}, never, never, false, never>; }