import * as React from 'react' import * as ProgressPrimitive from '@radix-ui/react-progress' import { cn } from '@/lib/utils' export interface ProgressProps extends Omit< React.ComponentPropsWithoutRef, 'value' > { value?: number | null max?: number className?: string } const Progress = React.forwardRef( ({ className, value, max = 100, ...rootProps }, ref) => { const percent = value != null ? Math.min(max, Math.max(0, value)) : undefined return ( } value={percent ?? null} max={max} className={cn( 'relative h-1 w-full overflow-hidden rounded-full bg-fill-secondary', className )} style={{ height: 4 }} {...rootProps} > ) } ) Progress.displayName = 'Progress' export { Progress }