FactuGES_ERP/packages/shadcn-ui/src/components/progress.tsx

30 lines
746 B
TypeScript
Raw Normal View History

2025-05-05 17:11:44 +00:00
import * as React from "react"
2026-03-17 09:24:39 +00:00
import { Progress as ProgressPrimitive } from "radix-ui"
2025-05-05 17:11:44 +00:00
import { cn } from "@repo/shadcn-ui/lib/utils"
function Progress({
className,
value,
...props
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
return (
<ProgressPrimitive.Root
data-slot="progress"
className={cn(
2026-03-17 17:49:54 +00:00
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
2025-05-05 17:11:44 +00:00
className
)}
{...props}
>
<ProgressPrimitive.Indicator
data-slot="progress-indicator"
2026-03-17 17:49:54 +00:00
className="size-full flex-1 bg-primary transition-all"
2025-05-05 17:11:44 +00:00
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</ProgressPrimitive.Root>
)
}
export { Progress }