Open History to see the last commit
1import * as ProgressPrimitive from "@radix-ui/react-progress";
2
3import { cn } from "@/lib/utils";
4
5function Progress({
6 className,
7 value,
8 ...props
9}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
10 return (
11 <ProgressPrimitive.Root
12 data-slot="progress"
13 className={cn(
14 "text-primary bg-current/20 relative h-2 w-full overflow-hidden rounded-full",
15 className,
16 )}
17 {...props}
18 >
19 <ProgressPrimitive.Indicator
20 data-slot="progress-indicator"
21 className="bg-current h-full w-full flex-1 transition-all"
22 style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
23 />
24 </ProgressPrimitive.Root>
25 );
26}
27
28export { Progress };