refactor: update progress component styles and add radix-ui/react-progress dependency 🔨

This commit is contained in:
2025-07-04 23:04:38 +05:00
parent ed19f440d8
commit cd1dba06f0
3 changed files with 5 additions and 3 deletions

View File

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

1
package-lock.json generated
View File

@ -12,6 +12,7 @@
"@hookform/resolvers": "^5.1.1",
"@pyncz/tailwind-mask-image": "^2.0.0",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-progress": "^1.1.7",
"@tailwindcss/postcss": "^4.1.11",
"@tanstack/react-query": "^5.61.4",
"axios": "^1.8.4",

View File

@ -13,6 +13,7 @@
"@hookform/resolvers": "^5.1.1",
"@pyncz/tailwind-mask-image": "^2.0.0",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-progress": "^1.1.7",
"@tailwindcss/postcss": "^4.1.11",
"@tanstack/react-query": "^5.61.4",
"axios": "^1.8.4",