18 lines
676 B
TypeScript
18 lines
676 B
TypeScript
|
|
import { ProgressBarProps } from "@/constants/types";
|
|
export function ProgressBarRow({ label, value, maxValue }: ProgressBarProps) {
|
|
const percentage = (value / maxValue) * 100;
|
|
|
|
return (
|
|
<div className="flex items-center justify-between py-1.5 text-sm">
|
|
<span className="text-[#899db7] w-32 truncate">{label}</span>
|
|
<div className="flex-1 mx-4 bg-[#122238] h-2.5 rounded-full overflow-hidden">
|
|
<div
|
|
className="bg-[#17cbb5] h-full rounded-full transition-all duration-500"
|
|
style={{ width: `${percentage}%` }}
|
|
/>
|
|
</div>
|
|
<span className="text-white font-bold w-6 text-right">{value}</span>
|
|
</div>
|
|
);
|
|
} |