File size: 719 Bytes
ca28016
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"use client"

import * as React from "react"
import * as ProgressPrimitive from "@radix-ui/react-progress"

import { cn } from "@/lib/utils"

const Progress = React.forwardRef<
  React.ElementRef<typeof ProgressPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
>(({ className, value, ...props }, ref) => (
  <div
    ref={ref}
    className={cn("relative h-2 w-full overflow-hidden rounded-full bg-[var(--bg-panel)] glass", className)}
    {...props}
  >
    <div
      className="absolute left-0 top-0 h-full bg-[var(--neon-cyan)] transition-all"
      style={{ width: `${value || 0}%` }}
    />
  </div>
))
Progress.displayName = ProgressPrimitive.Root.displayName

export { Progress }