import classNames from "classnames";
import toast from "react-hot-toast";
import { Check, Info } from "../icon";
type IToast = {
message: string;
toastVisible: boolean;
};
export const SuccessToast = ({ message, toastVisible }: IToast) => (
);
export const ErrorToast = ({ message, toastVisible }: IToast) => (
);
export const WarningToast = ({ message, toastVisible }: IToast) => (
);
export const DefaultToast = ({ message, toastVisible }: IToast) => (
);
const TOAST_VISIBLE_DURATION = 6000;
export function showToast(
message: string,
variant: "success" | "warning" | "error",
duration = TOAST_VISIBLE_DURATION
) {
switch (variant) {
case "success":
toast.custom((t) => , { duration });
break;
case "error":
toast.custom((t) => , { duration });
break;
case "warning":
toast.custom((t) => , { duration });
break;
default:
toast.custom((t) => , { duration });
break;
}
}