UNPKG

@vnmfify/core

Version:

```shell npm i @vnmfify/core -S ```

20 lines (19 loc) 897 B
import { ReactNode } from "react"; import Popup from "../popup"; import { ToastProps } from "./toast"; import { closeToast, openToast, resetDefaultToastOptions, setDefaultToastOptions, ToastOptions } from "./toast.imperative"; export type { ToastOptions } from "./toast.imperative"; export type { ToastType, ToastPosition } from "./toast.shared"; interface ToastInterface { (props: ToastProps): JSX.Element; Backdrop: typeof Popup.Backdrop; open: typeof openToast; loading(option: ReactNode | Omit<ToastOptions, "type">): void; success(option: ReactNode | Omit<ToastOptions, "type">): void; fail(option: ReactNode | Omit<ToastOptions, "type">): void; close: typeof closeToast; setDefaultOptions: typeof setDefaultToastOptions; resetDefaultOptions: typeof resetDefaultToastOptions; } declare const Toast: ToastInterface; export default Toast;