toasty-reactx
Version:
A lightweight, customizable toast notification system for React applications.
11 lines (10 loc) • 509 B
TypeScript
import { ToastOptions } from "../types";
export declare const useToast: () => {
toasts: import("..").Toast[];
toast: (message: string | React.ReactNode, options?: ToastOptions) => string;
success: (message: string | React.ReactNode, options?: ToastOptions) => string;
error: (message: string | React.ReactNode, options?: ToastOptions) => string;
info: (message: string | React.ReactNode, options?: ToastOptions) => string;
dismiss: (id: string) => void;
dismissAll: () => void;
};