UNPKG

toasty-reactx

Version:

A lightweight, customizable toast notification system for React applications.

44 lines (43 loc) 1.18 kB
import { Toast, ToastOptions, ToastPosition } from "../types"; export declare const defaultPosition: ToastPosition; export declare const defaultDuration = 3000; export declare const generateId: () => string; export declare const createToast: (message: string | React.ReactNode, options?: ToastOptions) => Toast; export declare const getToastPositionStyle: (position: string) => { top: string; left: string; transform?: undefined; right?: undefined; bottom?: undefined; } | { top: string; left: string; transform: string; right?: undefined; bottom?: undefined; } | { top: string; right: string; left?: undefined; transform?: undefined; bottom?: undefined; } | { bottom: string; left: string; top?: undefined; transform?: undefined; right?: undefined; } | { bottom: string; left: string; transform: string; top?: undefined; right?: undefined; } | { bottom: string; right: string; top?: undefined; left?: undefined; transform?: undefined; }; export declare const getToastTypeClass: (toast: ToastOptions) => "toast-success" | "toast-error" | "toast-info" | "";