UNPKG

@choi-ui/react-toast

Version:

This package provides easy access to toast messages in React applications.

19 lines (14 loc) 531 B
import React$1 from 'react'; declare const Toast: () => React$1.ReactPortal; interface ToastType { id?: string; message?: string; type?: 'success' | 'error' | 'warn' | 'default'; duration?: number; isClosable?: boolean; variants?: 'filled' | 'outlined'; custom?: () => React.ReactNode; position?: 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left'; } declare const addToast: (toast: ToastType) => void; export { type ToastType, Toast as default, addToast as onToast };