UNPKG

@phonehtut/react-native-sonner

Version:

A simple and customizable toast notification system for React Native applications

13 lines (12 loc) 340 B
export type ToastType = 'success' | 'error' | 'info'; export interface Toast { id: string; message: string; type?: ToastType; duration?: number; } export interface ToastContextType { toasts: Toast[]; showToast: (message: string, type?: ToastType, duration?: number) => void; removeToast: (id: string) => void; }