UNPKG

done-pop

Version:

A custom toast notification package similar to notistack

22 lines (21 loc) 627 B
import React from "react"; interface ToastProviderProps { children: React.ReactNode; dense?: boolean; preventDuplicate?: boolean; maxSnack?: number; autoHideDuration?: number; anchorOrigin?: { horizontal: "left" | "center" | "right"; vertical: "top" | "bottom"; }; } interface ToastOptions { variant: "success" | "error" | "info" | "warning"; } interface ToasterContextProps { Toast: (message: string, options: ToastOptions) => void; } export declare const ToasterProvider: React.FC<ToastProviderProps>; export declare const useToaster: () => ToasterContextProps; export {};