react-simple-toasts
Version:
Instant, lightweight toast notifications for React. No providers or containers needed.
12 lines (11 loc) • 755 B
TypeScript
import { ReactNode } from 'react';
import { Themes } from './lib/constants';
import { Theme, Toast, ToastClickHandler, ToastComponent, ToastOptions, ToastPosition, ToastUpdateArgs, ToastUpdateOptions } from './type/common';
export declare const toastConfig: (options: ToastOptions) => void;
export declare const clearToasts: () => void;
declare function toast(message: ReactNode, duration?: number | null): Toast;
declare function toast(message: ReactNode, options?: ToastOptions): Toast;
export declare const createToast: (options: ToastOptions) => typeof toast;
export default toast;
export { Themes, toast };
export type { ToastPosition, Theme, ToastClickHandler, ToastOptions, Toast, ToastComponent, ToastUpdateOptions, ToastUpdateArgs, };