feat: add progressbar on lists

This commit is contained in:
Julien Froidefond
2025-02-26 08:07:40 +01:00
parent 15a27005a0
commit 7c8fa6bf72
6 changed files with 83 additions and 18 deletions

View File

@@ -0,0 +1,19 @@
interface ProgressBarProps {
progress: number;
total: number;
}
export function ProgressBar({ progress, total }: ProgressBarProps) {
const percentage = Math.round((progress / total) * 100);
return (
<div className="absolute bottom-0 left-0 right-0 px-3 py-2 bg-black/50 backdrop-blur-sm border-t border-white/10">
<div className="h-2 bg-white/30 rounded-full overflow-hidden">
<div
className="h-full bg-white rounded-full transition-all duration-300"
style={{ width: `${percentage}%` }}
/>
</div>
</div>
);
}