react-universal-toast
Version:
A lightweight, customizable toast notification system for React applications with TypeScript support.
15 lines (14 loc) • 457 B
TypeScript
import { ReactNode } from "react";
import { Toast, Placement } from "./types";
interface ToastContextType {
show: (msg: ReactNode, opts?: {
type?: Toast["type"];
}) => string;
remove: (id: string) => void;
}
export declare const ToastProvider: ({ children, placement }: {
children: ReactNode;
placement?: Placement;
}) => import("react/jsx-runtime").JSX.Element;
export declare const useToast: () => ToastContextType;
export {};