CoolFace
Apppublic

huggingface/ai-deadlines

sourceHugging Faceupdated 3d agoView on Hugging Face
781likes
progress.tsx27 linesDownload Raw Back to ui
1import * as React from "react"2import * as ProgressPrimitive from "@radix-ui/react-progress"3 4import { cn } from "@/lib/utils"5 6const Progress = React.forwardRef<7  React.ElementRef<typeof ProgressPrimitive.Root>,8  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>9>(({ className, value, ...props }, ref) => (10  <ProgressPrimitive.Root11    ref={ref}12    className={cn(13      "relative h-4 w-full overflow-hidden rounded-full bg-secondary",14      className15    )}16    {...props}17  >18    <ProgressPrimitive.Indicator19      className="h-full w-full flex-1 bg-primary transition-all"20      style={{ transform: `translateX(-${100 - (value || 0)}%)` }}21    />22  </ProgressPrimitive.Root>23))24Progress.displayName = ProgressPrimitive.Root.displayName25 26export { Progress }27