File size: 1,024 Bytes
7b4f5dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ═══════════════════════════════════════════════════════════════
   SeverityBadge β€” Styled severity indicator
   CRITICAL pulses, HIGH glows, MEDIUM/LOW static
   ═══════════════════════════════════════════════════════════════ */

export default function SeverityBadge({ severity }) {
  const severityConfig = {
    critical: { label: 'CRITICAL', icon: 'πŸ”΄' },
    high: { label: 'HIGH', icon: '🟠' },
    medium: { label: 'MEDIUM', icon: '🟑' },
    low: { label: 'LOW', icon: '🟒' },
    info: { label: 'INFO', icon: 'πŸ”΅' },
  };

  const config = severityConfig[severity] || severityConfig.info;

  return (
    <span className={`severity-badge severity-${severity}`}>
      <span>{config.icon}</span>
      <span>{config.label}</span>
    </span>
  );
}