Upload frontend/src/components/ui/slider.tsx with huggingface_hub
Browse files
frontend/src/components/ui/slider.tsx
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import * as React from "react";
|
| 2 |
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
| 3 |
+
|
| 4 |
+
import { cn } from "@/lib/utils";
|
| 5 |
+
|
| 6 |
+
const Slider = React.forwardRef<
|
| 7 |
+
React.ElementRef<typeof SliderPrimitive.Root>,
|
| 8 |
+
React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>
|
| 9 |
+
>(({ className, ...props }, ref) => (
|
| 10 |
+
<SliderPrimitive.Root
|
| 11 |
+
ref={ref}
|
| 12 |
+
className={cn("relative flex w-full touch-none select-none items-center", className)}
|
| 13 |
+
{...props}
|
| 14 |
+
>
|
| 15 |
+
<SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20">
|
| 16 |
+
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
| 17 |
+
</SliderPrimitive.Track>
|
| 18 |
+
<SliderPrimitive.Thumb className="block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" />
|
| 19 |
+
</SliderPrimitive.Root>
|
| 20 |
+
));
|
| 21 |
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
| 22 |
+
|
| 23 |
+
export { Slider };
|