18 lines
482 B
TypeScript
18 lines
482 B
TypeScript
import { cn } from '../../lib/utils';
|
|
|
|
function Progress({ percent, className }: { percent: number; className?: string }) {
|
|
return (
|
|
<div
|
|
data-slot="progress"
|
|
className={cn('h-2 overflow-hidden rounded-full bg-input', className)}
|
|
>
|
|
<div
|
|
className="h-full rounded-full bg-(image:--progress-grad) transition-[width] duration-300"
|
|
style={{ width: `${Math.max(0, Math.min(100, percent))}%` }}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export { Progress };
|