import React, { Fragment, useState } from 'react'; import { Transition } from '@headlessui/react'; import { CheckCircleIcon, ExclamationCircleIcon, InformationCircleIcon, ShieldExclamationIcon, } from '@heroicons/react/24/outline'; import { XMarkIcon } from '@heroicons/react/20/solid'; export interface ToasterProps { children?: any; } export interface ToastBaseProps { children?: any; type: 'success' | 'error' | 'warning' | 'info'; } export interface ToastTitleProps { children?: any; } export interface ToastContentProps { children?: any; } const Toaster = ({ children }: ToasterProps) => { return (
{children}
; }; const Content = ({ children }: ToastContentProps) => { return{children}
; }; const ToastBase = ({ children, type }: ToastBaseProps) => { const [showToast, setShowToast] = useState(true); const toastTypes = { success: { icon: CheckCircleIcon, color: 'text-green-400', }, warning: { icon: ShieldExclamationIcon, color: 'text-yellow-400', }, error: { icon: ExclamationCircleIcon, color: 'text-cu-red', }, info: { icon: InformationCircleIcon, color: 'text-gray-600', }, }; return (