import { ExclamationTriangleIcon, XCircleIcon } from '@heroicons/react/24/solid' import { IconCircleCheck } from '@tabler/icons-react' import classNames from '~/lib/classNames' export type AlertProps = React.HTMLAttributes & { title: string message?: string type: 'warning' | 'error' | 'success' children?: React.ReactNode } export default function Alert({ title, message, type, children, ...props }: AlertProps) { const getIcon = () => { const Icon = type === 'warning' ? ExclamationTriangleIcon : type === 'error' ? XCircleIcon : IconCircleCheck const color = type === 'warning' ? 'text-yellow-400' : type === 'error' ? 'text-red-400' : 'text-green-400' return