/** * @usevyre/react — Toast / Notification * * AI CONTEXT: * ┌─────────────────────────────────────────────────────────┐ * │ Components: ToastProvider + useToast hook │ * │ Import: import { ToastProvider, useToast } │ * │ from "@usevyre/react" │ * │ │ * │ Setup: wrap app root with │ * │ │ * │ useToast() returns: │ * │ toast({ title?, description?, variant?, duration? }) │ * │ dismiss(id) │ * │ │ * │ toast() options: │ * │ title = string │ * │ description = string │ * │ variant = "default"|"success"|"warning"|"danger" │ * │ duration = number (ms, default 4000) │ * │ Infinity = stays until dismissed │ * └─────────────────────────────────────────────────────────┘ * * @example * // 1. Wrap your app * * * * * // 2. Use inside any component * const { toast } = useToast(); * * toast({ title: "Saved", variant: "success" }); * toast({ title: "Error", description: "Something went wrong", variant: "danger" }); * toast({ title: "Processing...", duration: Infinity }); */ import React from "react"; export type ToastVariant = "default" | "success" | "warning" | "danger"; export interface ToastInput { title?: string; description?: string; variant?: ToastVariant; /** Duration in ms. Use Infinity to keep until manually dismissed. Default: 4000 */ duration?: number; } interface ToastContextValue { toast: (input: ToastInput) => string; dismiss: (id: string) => void; } export declare function ToastProvider({ children }: { children: React.ReactNode; }): import("react/jsx-runtime").JSX.Element; export declare function useToast(): ToastContextValue; export {};