import { Icon, type ApprovedIconName } from './Icon'; import styles from './StatusBadge.module.css'; export type StatusTone = 'neutral' | 'info' | 'success' | 'warning' | 'error'; const icons: Partial> = { info: 'info', success: 'check', warning: 'warning', error: 'error', }; export function StatusBadge({ children, tone = 'neutral', showIcon = false, }: { children: string; tone?: StatusTone; showIcon?: boolean; }) { const icon = icons[tone]; return ( {showIcon && icon ? : null} {children} ); }