({ id, message, level = 'info', className })
| 30 | }; |
| 31 | |
| 32 | const AlertWidget = ({ id, message, level = 'info', className }) => { |
| 33 | const config = levelConfig[level] || levelConfig.info; |
| 34 | const Icon = config.icon; |
| 35 | |
| 36 | return ( |
| 37 | <Alert id={id} variant={config.variant} className={cn('alertwidget-container', className)}> |
| 38 | <Icon className="alertwidget-icon" /> |
| 39 | <AlertTitle>{config.title}</AlertTitle> |
| 40 | <AlertDescription>{message}</AlertDescription> |
| 41 | </Alert> |
| 42 | ); |
| 43 | }; |
| 44 | |
| 45 | export default AlertWidget; |