expo-toastee
Version:
A simple and elegant toast notification library for React Native Expo with Material You and Neobrutalist themes
19 lines (18 loc) • 650 B
TypeScript
import { ToastConfig, ToastOptions } from './types';
type ToastListener = (toasts: ToastConfig[]) => void;
declare class ToastManager {
private toasts;
private listeners;
private idCounter;
subscribe(listener: ToastListener): () => void;
private notify;
private addToast;
removeToast(id: string): void;
clearAll(): void;
success(message: string, options?: ToastOptions): void;
error(message: string, options?: ToastOptions): void;
info(message: string, options?: ToastOptions): void;
warning(message: string, options?: ToastOptions): void;
}
export declare const toastManager: ToastManager;
export {};