toastonstaroid
Version:
A simple and beautiful toast notification library for React
32 lines (28 loc) • 1.32 kB
TypeScript
import React from 'react';
type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
interface ToastContainerProps {
position?: ToastPosition;
className?: string;
style?: React.CSSProperties;
}
declare const ToastContainer: React.FC<ToastContainerProps>;
interface ToastOptions {
duration?: number;
textColor?: string;
iconColor?: string;
backgroundStyle?: 'blur' | 'solid';
}
declare const toast: {
basic: (message: string, options?: number | ToastOptions) => void;
success: (message: string, options?: number | ToastOptions) => void;
error: (message: string, options?: number | ToastOptions) => void;
warning: (message: string, options?: number | ToastOptions) => void;
info: (message: string, options?: number | ToastOptions) => void;
fire: (message: string, options?: number | ToastOptions) => void;
rain: (message: string, options?: number | ToastOptions) => void;
smoke: (message: string, options?: number | ToastOptions) => void;
cyberpunk: (message: string, options?: number | ToastOptions) => void;
dragonball: (message: string, options?: number | ToastOptions) => void;
waterflow: (message: string, options?: number | ToastOptions) => void;
};
export { ToastContainer, toast };