UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

44 lines (43 loc) 1.04 kB
import { ToastAPI, ToastPosition } from "./type.mjs"; import * as react143 from "react"; //#region src/base-ui/Toast/imperative.d.ts declare const toast: ToastAPI; interface ToastHostProps { className?: string; /** * Default duration for toasts * @default 5000 */ duration?: number; /** * Maximum number of toasts * @default 5 */ limit?: number; /** * Toast position * @default 'bottom-right' */ position?: ToastPosition; /** * Root element for portal */ root?: HTMLElement | ShadowRoot | null; /** * Swipe direction to dismiss * @default ['down', 'right'] */ swipeDirection?: ('left' | 'right' | 'up' | 'down') | ('left' | 'right' | 'up' | 'down')[]; } declare const ToastHost: react143.MemoExoticComponent<({ root, className, duration, limit, position, swipeDirection }: ToastHostProps) => null | undefined>; declare const useToast: () => ToastAPI; //#endregion export { ToastHost, ToastHostProps, toast, useToast }; //# sourceMappingURL=imperative.d.mts.map