import classNames from "classnames"; import toast from "react-hot-toast"; import { FiCheck, FiInfo } from "@calcom/ui/components/icon"; type IToast = { message: string; toastVisible: boolean; }; export const SuccessToast = ({ message, toastVisible }: IToast) => (

{message}

); export const ErrorToast = ({ message, toastVisible }: IToast) => (

{message}

); export const WarningToast = ({ message, toastVisible }: IToast) => (

{message}

); export const DefaultToast = ({ message, toastVisible }: IToast) => (

{message}

); 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; } }