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