import { ToastProvider, useToast } from '@hanzo/ui/product'
No examples yet.
export type ToastKind = 'success' | 'error' | 'warning' | 'info'
export type ToastInput = {title: stringdescription?: stringkind?: ToastKind/** Auto-dismiss after this many ms; 0 keeps it until dismissed. */durationMs?: number/** Drop the leading icon. Defaults to showing it. */showIcon?: boolean}
export type Toast = ToastInput & { id: number; kind: ToastKind; durationMs: number; showIcon: boolean }
export type ToastApi = {toast: (t: ToastInput) => voidsuccess: (title: string, description?: string) => voiderror: (title: string, description?: string) => voidwarning: (title: string, description?: string) => voidinfo: (title: string, description?: string) => voiddismiss: (id: number) => void}