@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
8 lines (7 loc) • 589 B
JavaScript
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { cn } from '../../helpers';
const Progress = React.forwardRef(({ className, value = 0, max = 100, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('relative h-2 w-full overflow-hidden rounded-full bg-gray-200', className), ...props, children: _jsx("div", { className: "h-full w-full flex-1 bg-blue-500 transition-all duration-300 ease-in-out", style: { transform: `translateX(-${100 - (value / max) * 100}%)` } }) })));
Progress.displayName = 'Progress';
export { Progress };