Upload frontend/src/components/ui/progress.tsx with huggingface_hub
Browse files
frontend/src/components/ui/progress.tsx
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import * as React from "react";
|
| 4 |
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
| 5 |
+
|
| 6 |
+
import { cn } from "@/lib/utils";
|
| 7 |
+
|
| 8 |
+
const Progress = React.forwardRef<
|
| 9 |
+
React.ElementRef<typeof ProgressPrimitive.Root>,
|
| 10 |
+
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
|
| 11 |
+
>(({ className, value, ...props }, ref) => (
|
| 12 |
+
<ProgressPrimitive.Root
|
| 13 |
+
ref={ref}
|
| 14 |
+
className={cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className)}
|
| 15 |
+
{...props}
|
| 16 |
+
>
|
| 17 |
+
<ProgressPrimitive.Indicator
|
| 18 |
+
className="h-full w-full flex-1 bg-primary transition-all"
|
| 19 |
+
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
| 20 |
+
/>
|
| 21 |
+
</ProgressPrimitive.Root>
|
| 22 |
+
));
|
| 23 |
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
| 24 |
+
|
| 25 |
+
export { Progress };
|