Files
KAFM-Project/components/dashboard/statusProgressRow.tsx

21 lines
714 B
TypeScript

import { StatusProgressProps } from "@/constants/types";
export function StatusProgressRow({ label, value, total, barColor = "bg-[#17cbb5]" }: StatusProgressProps) {
const percentage = (value / total) * 100;
return (
<div className="space-y-2 py-1.5">
<div className="flex justify-between text-xs font-semibold">
<span className="text-white">{label}</span>
<span className="text-[#5b7391]">{value}/{total}</span>
</div>
<div className="bg-[#122238] h-3 rounded-full overflow-hidden">
<div
className={`${barColor} h-full rounded-full transition-all duration-500`}
style={{ width: `${percentage}%` }}
/>
</div>
</div>
);
}