mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-21 04:45:12 +00:00
git-subtree-dir: packages/browseros-agent git-subtree-mainline:8f148d0918git-subtree-split:90bd4be300
33 lines
751 B
TypeScript
33 lines
751 B
TypeScript
import * as ProgressPrimitive from '@radix-ui/react-progress'
|
|
import type * as React from 'react'
|
|
|
|
import { cn } from '@/lib/utils'
|
|
|
|
/**
|
|
* @public
|
|
*/
|
|
function Progress({
|
|
className,
|
|
value,
|
|
...props
|
|
}: React.ComponentProps<typeof ProgressPrimitive.Root>) {
|
|
return (
|
|
<ProgressPrimitive.Root
|
|
data-slot="progress"
|
|
className={cn(
|
|
'relative h-2 w-full overflow-hidden rounded-full bg-primary/20',
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
<ProgressPrimitive.Indicator
|
|
data-slot="progress-indicator"
|
|
className="h-full w-full flex-1 bg-primary transition-all"
|
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
/>
|
|
</ProgressPrimitive.Root>
|
|
)
|
|
}
|
|
|
|
export { Progress }
|