UNPKG

ultra-design

Version:
20 lines (19 loc) 880 B
import React from 'react'; import { ToastProps } from './toast-internal'; import { PartialProviderConfig } from '../config-provider/config-provider'; declare type OnClose = () => void; declare function toast(content: string, duration?: number, onClose?: OnClose): void; declare function toast(props: ToastProps): void; declare type ToastInstance = typeof toast & { info: (content: React.ReactNode, duration?: number, onClose?: OnClose) => void; success: (content: React.ReactNode, duration?: number, onClose?: OnClose) => void; warning: (content: React.ReactNode, duration?: number, onClose?: OnClose) => void; error: (content: React.ReactNode, duration?: number, onClose?: OnClose) => void; clear: () => void; config: (config: PartialProviderConfig) => void; }; /** * toast mesaage component */ declare const Toast: ToastInstance; export default Toast;