import { cn } from '@/utils/cn'; import { round } from '@/utils/math'; import * as ProgressPrimitive from '@radix-ui/react-progress'; import * as React from 'react'; const Progress = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { size?: 'sm' | 'default' | 'lg'; innerClassName?: string; } >(({ className, innerClassName, value, size = 'default', ...props }, ref) => ( {value && size !== 'sm' && (
{round(value, 2)}%
)}
)); Progress.displayName = ProgressPrimitive.Root.displayName; export { Progress };