// Generated by dts-bundle-generator v7.2.0 import React from 'react'; import { HTMLAttributes, ReactNode } from 'react'; export type ToastOffset = "default" | "high"; export type ToastBehavior = "stacked" | "single"; export interface ToastProviderProperties { /** * @TJS-type React.ReactNode */ children: ReactNode; /** * Controls the vertical offset of the toast container from the bottom. * Use "high" for mobile apps with bottom navigation bars. * @default "default" */ offset?: ToastOffset; /** * Controls how multiple toasts are handled. * "stacked" - new toasts are piled up alongside already rendered ones. * "single" - only one toast is shown at a time; each new toast immediately replaces the previous one. * @default "stacked" */ behavior?: ToastBehavior; } export type ToastProviderProps = ToastProviderProperties; export declare const ToastProvider: React.FC; export interface ToastComponents { Provider: typeof ToastProvider; } export type Types = "primary" | "success" | "danger" | "progress"; export interface ToastProperties { /** * Unique toast ID used when hiding or removing a toast. */ id: string; /** * The text that should appear in the toast message. */ text: string; /** * Change the visual style of the toast. * @default primary */ type?: Types; /** * The time in milliseconds that the toast message should persist. * @default 4000 */ duration?: 4000 | 8000 | 16000; /** * Tells you whether or not Toast should close automatically. * @default true */ autoClose?: boolean; /** * Tells the toast position when we are using multiple toasts. * @default 0 */ position?: number; } export type ToastProps = ToastProperties & HTMLAttributes; export declare const Toast: React.FC & ToastComponents; export interface ToastContextProps { closeToast: (id: string) => void; addToast: (toast: Omit) => void; } export declare const useToast: () => ToastContextProps; export {};