Files
ProxMenux/AppImage/components/ui/progress.tsx

32 lines
741 B
TypeScript
Raw Normal View History

2025-09-28 23:05:59 +02:00
'use client'
2025-09-28 20:28:35 +02:00
2025-09-28 23:05:59 +02:00
import * as React from 'react'
import * as ProgressPrimitive from '@radix-ui/react-progress'
2025-09-28 20:28:35 +02:00
2025-09-28 23:05:59 +02:00
import { cn } from '@/lib/utils'
2025-09-28 20:28:35 +02:00
2025-09-28 23:05:59 +02:00
function Progress({
className,
value,
...props
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
return (
<ProgressPrimitive.Root
data-slot="progress"
className={cn(
'bg-primary/20 relative h-2 w-full overflow-hidden rounded-full',
className,
)}
{...props}
>
<ProgressPrimitive.Indicator
data-slot="progress-indicator"
className="bg-primary h-full w-full flex-1 transition-all"
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
</ProgressPrimitive.Root>
)
}
2025-09-28 20:28:35 +02:00
export { Progress }