UNPKG

@a7medhassan/react-toast

Version:
21 lines (17 loc) 558 B
import { ReactNode, FC } from 'react'; type ToastProps = { id: string; type?: "success" | "info" | "warning" | "error"; message?: ReactNode; duration?: number; position?: ToastPositionType; icon?: ReactNode | boolean; }; type ToastPositionType = "topLeft" | "topCenter" | "topRight" | "bottomRight" | "bottomCenter" | "bottomLeft"; declare const useReactToast: () => { addToast: (toast: Omit<ToastProps, "id">) => void; }; declare const ToastProvider: FC<{ children: ReactNode; }>; export { ToastProvider, useReactToast };