import React from 'react'; import alerts from '../configs/alerts'; export interface AlertProps { callback: () => void; children: React.ReactNode; variant?: keyof typeof alerts; icon?: string; id?: string; close?: boolean; theme?: string; } const Alert = ({ callback = () => {}, children, variant = 'default', id, icon, close, theme = 'w-full text-left', }: AlertProps) => { if (children === '' || !children) return <>; return (
{icon && (
)}
{children}
{close && ( )}
); }; export default Alert;