| 1 | "use client" |
| 2 | |
| 3 | export function UsageBar({ |
| 4 | used, |
| 5 | total, |
| 6 | allocated, |
| 7 | className, |
| 8 | }: { |
| 9 | used: number |
| 10 | total: number |
| 11 | allocated?: number |
| 12 | className?: string |
| 13 | }) { |
| 14 | const pct = |
| 15 | const allocatedPct = |
| 16 | |
| 17 | return ( |
| 18 | <div className={` |
| 19 | <div className="h-full rounded-full bg-blue-500 |
| 20 | {allocatedPct != null |
| 21 | <div className="absolute top-0 h-full w-0.5 bg-amber-500 |
| 22 | )} |
| 23 | </div> |
| 24 | ); |
| 25 | } |