import { cn } from "@/lib/utils"; export interface ProgressProps { value: number; max?: number; className?: string; tone?: "signal" | "amber" | "vermilion"; showLabel?: boolean; } export function Progress({ value, max = 100, className, tone = "signal", showLabel, }: ProgressProps) { const pct = Math.max(0, Math.min(100, (value / max) * 100)); const stroke = { signal: "var(--color-signal)", amber: "var(--color-amber)", vermilion: "var(--color-vermilion)", }[tone]; return (
{showLabel && ( {Math.round(pct)}% )}
); }