df-ae-forms-package
Version:
A comprehensive React form preview component library with form controls, validation, and responsive design for Angular/Ionic integration
27 lines • 926 B
TypeScript
export interface IToast {
id: string;
message: string;
type: 'success' | 'danger' | 'warning' | 'info';
duration?: number;
}
declare class ToastService {
private toasts;
private listeners;
private defaultDuration;
private timeouts;
private generateId;
private notifyListeners;
private addToast;
removeToast(id: string): void;
showSuccess(message: string, duration?: number): void;
showError(message: string, duration?: number): void;
showWarning(message: string, duration?: number): void;
showInfo(message: string, duration?: number): void;
show(message: string, type?: 'success' | 'danger' | 'warning' | 'info', duration?: number): void;
clearAll(): void;
subscribe(listener: (toasts: IToast[]) => void): () => void;
getToasts(): IToast[];
}
export declare const toastService: ToastService;
export {};
//# sourceMappingURL=toast.service.d.ts.map