import { IconCheck, IconExclamationCircle } from "@tabler/icons-react"; import cn from "classnames"; import type { ReactNode } from "react"; function Msg({ data }: any) { const cns = cn("toast", "show", data.type || null); let icon: ReactNode = null; switch (data.type) { case "success": icon = ; break; case "error": icon = ; break; } return (
{data.title && (
{icon} {data.title}
)}
{data.message}
); } export { Msg };