UNPKG

@veracity/vui

Version:

Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.

20 lines (19 loc) 1.02 kB
import { ToastOptions } from "./toast.types.js"; import { ReactNode } from "react"; //#region src/toast/useToast.d.ts declare const defaultDuration = "fast"; declare const fastToastDuration = 4000; declare const slowToastDuration = 8000; declare const useToast: () => { showToast: (options?: ToastOptions) => void; hideToast: (id: string) => void; showInfo: (text: ReactNode, options?: Omit<ToastOptions, 'text' | 'status'>) => void; showSuccess: (text: ReactNode, options?: Omit<ToastOptions, 'text' | 'status'>) => void; showWarning: (text: ReactNode, options?: Omit<ToastOptions, 'text' | 'status'>) => void; showDanger: (text: ReactNode, options?: Omit<ToastOptions, 'text' | 'status'>) => void; showError: (text: ReactNode, options?: Omit<ToastOptions, 'text' | 'status'>) => void; showLoading: (text: ReactNode, options?: Omit<ToastOptions, 'text' | 'status'>) => void; }; //#endregion export { defaultDuration, fastToastDuration, slowToastDuration, useToast }; //# sourceMappingURL=useToast.d.ts.map