Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 193x | interface BreakdownBarProps {
name: string;
percentage: number;
color?: string;
}
export function BreakdownBar({
name,
percentage,
color = "bg-primary-600",
}: BreakdownBarProps) {
return (
<div className="space-y-2">
<div className="flex items-center justify-between">
<span className="text-sm font-medium text-foreground-default capitalize">
{name}
</span>
<span className="text-sm text-foreground-muted">{percentage}%</span>
</div>
<div className="w-full bg-background-muted rounded-full h-2">
<div
className={`${color} h-2 rounded-full transition-all`}
style={{ width: `${percentage}%` }}
/>
</div>
</div>
);
}
|