import { AlertTriangle, CheckCircle, Info, LucideIcon, XCircle } from 'lucide-react'; import React from 'react'; import { Box } from './Box'; import { Icon } from './Icon'; import { Stack } from './Stack'; import { Surface } from './Surface'; import { Text } from './Text'; type BannerType = 'info' | 'warning' | 'success' | 'error'; interface InfoBannerProps { type?: BannerType; title?: string; children: React.ReactNode; icon?: LucideIcon; } export function InfoBanner({ type = 'info', title, children, icon: CustomIcon, }: InfoBannerProps) { const bannerConfig: Record = { info: { icon: Info, bg: 'rgba(38, 38, 38, 0.3)', border: 'rgba(38, 38, 38, 0.5)', titleColor: 'text-gray-300', iconColor: '#9ca3af', }, warning: { icon: AlertTriangle, bg: 'rgba(245, 158, 11, 0.1)', border: 'rgba(245, 158, 11, 0.3)', titleColor: 'text-warning-amber', iconColor: '#f59e0b', }, success: { icon: CheckCircle, bg: 'rgba(16, 185, 129, 0.1)', border: 'rgba(16, 185, 129, 0.3)', titleColor: 'text-performance-green', iconColor: '#10b981', }, error: { icon: XCircle, bg: 'rgba(239, 68, 68, 0.1)', border: 'rgba(239, 68, 68, 0.3)', titleColor: 'text-error-red', iconColor: '#ef4444', }, }; const config = bannerConfig[type]; const BannerIcon = CustomIcon || config.icon; return ( {title && ( {title} )} {children} ); }