infinity-forge
Version:
19 lines (18 loc) • 555 B
TypeScript
import { ReactNode } from 'react';
export type Toast = {
uid?: string;
title?: string;
message: string;
confirmButtonText?: string;
cancelButtonText?: string;
onConfirm?: () => void | Promise<void>;
onCancel?: () => void | Promise<void>;
Component?: (toast: Toast & {
progressWidth: number;
closeToast: VoidFunction;
setToast: React.Dispatch<React.SetStateAction<Toast[]>>;
}) => ReactNode;
duration?: number;
isModal?: boolean;
status?: 'success' | 'error' | 'info' | 'warning';
};