Files
sarlink-portal/components/ui/progress.tsx
i701 9e0d2d277b
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m56s
refactor: streamline package.json and tailwind.config.ts
- Simplified dependencies in package.json by removing unused packages and organizing existing ones.
- Updated tailwind.config.ts for better readability and maintainability, ensuring consistent formatting and structure.
2025-06-27 13:12:29 +05:00

29 lines
787 B
TypeScript

"use client"
import * as React from "react"
import { Progress as ProgressPrimitive } from "radix-ui"
import { cn } from "@/lib/utils"
const Progress = React.forwardRef<
React.ElementRef<typeof ProgressPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
>(({ className, value, ...props }, ref) => (
<ProgressPrimitive.Root
ref={ref}
className={cn(
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
className
)}
{...props}
>
<ProgressPrimitive.Indicator
className="h-full w-full flex-1 bg-primary transition-all"
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</ProgressPrimitive.Root>
))
Progress.displayName = ProgressPrimitive.Root.displayName
export { Progress }