import * as React from 'react'; import { cn } from '@/lib/utils/cn'; export interface ProgressProps { value: number; max?: number; className?: string; showLabel?: boolean; } const Progress = React.forwardRef( ({ value, max = 100, className, showLabel = false }, ref) => { const percentage = Math.min(Math.max((value / max) * 100, 0), 100); return (
{showLabel && (
{Math.round(percentage)}%
)}
); } ); Progress.displayName = 'Progress'; export { Progress };