UNPKG

react-fresh-toast

Version:
17 lines (14 loc) 500 B
type PositionType = "bottom-left" | "bottom-right" | "top-left" | "top-right" | "top-center"; interface ToastProps { type: "success" | "info" | "warning" | "error"; message: string; onClose?: () => void; animation?: "fade" | "pop" | "slide"; duration?: number; } interface UseToastReturn { ToastContainer: JSX.Element; triggerToast: (toastProps: ToastProps) => void; } declare const useToast: (position?: PositionType) => UseToastReturn; export { useToast as default };