29 lines
573 B
TypeScript
29 lines
573 B
TypeScript
import { cn } from "@/lib/utils";
|
|
import { RiskLevel } from "@/types/appops";
|
|
|
|
interface RiskBadgeProps {
|
|
level: RiskLevel;
|
|
}
|
|
|
|
export const RiskBadge = ({ level }: RiskBadgeProps) => {
|
|
const styles = {
|
|
low: 'text-slate-400',
|
|
medium: 'text-amber-400',
|
|
high: 'text-orange-500',
|
|
critical: 'text-rose-500 font-bold'
|
|
};
|
|
|
|
const labels = {
|
|
low: 'LAAG',
|
|
medium: 'MEDIUM',
|
|
high: 'HOOG',
|
|
critical: 'CRITICAL'
|
|
};
|
|
|
|
return (
|
|
<span className={cn("font-mono text-[9px] uppercase", styles[level])}>
|
|
{labels[level]}
|
|
</span>
|
|
);
|
|
};
|