type Props = { now: number; label?: string | null; variant?: "warn" | "info" | "success" | "error"; }; const variantClassNames = { warn: "bg-amber-500 text-white", info: "bg-blue-500 text-white", success: "bg-green-700 text-white", error: "bg-red-500 text-white", }; export const ProgressBar = ({ now, variant, label }: Props) => { const progressLabel = label ?? `${now.toFixed(2)}%`; const variantClassName = variantClassNames[variant ?? "info"] ?? variantClassNames["info"]; return (