import { CircleAlert, CircleSlash2, LucideProps, TriangleAlert, } from 'lucide-react'; import React from 'react'; import Card from '~/components/Card'; export interface NoticeProps { children: React.ReactNode; title?: string; variant?: 'default' | 'error' | 'warning'; icon?: React.ReactElement; } export default function Notice({ children, title, variant, icon, }: NoticeProps) { return (
{title ? ( {title} ) : undefined} {!variant && icon ? icon : iconForVariant(variant)}
{children}
); } function iconForVariant(variant?: 'default' | 'error' | 'warning') { switch (variant) { case 'error': return ; case 'warning': return ; default: return ; } }