import * as RadixToast from '@radix-ui/react-toast'; import { NotificationSeverity } from '~/common/types'; import { useToast } from '~/hooks'; export function Toast() { const { toast, onOpenChange } = useToast(); const severityClassName = { [NotificationSeverity.INFO]: 'border-gray-500 bg-gray-500', [NotificationSeverity.SUCCESS]: 'border-green-500 bg-green-500', [NotificationSeverity.WARNING]: 'border-orange-500 bg-orange-500', [NotificationSeverity.ERROR]: 'border-red-500 bg-red-500', }; return (
{toast.showIcon && (
)}
{toast.message}
); }