import React from 'react' import toast from 'react-hot-toast' import { XIcon, CheckCircleIcon, ExclamationCircleIcon, } from '@heroicons/react/outline' export default function ToastContent({ toastData, icon, message }) { let borderColor let fancyIcon if (toastData.type === 'success') { borderColor = 'border-green-500' fancyIcon = } else if (toastData.type === 'error') { borderColor = 'border-red-500' fancyIcon = } else { borderColor = 'border-indigo-500' } return (
{fancyIcon}
{message}
{toastData.type !== 'loading' && ( )}
) }