[+] Progress bar

This commit is contained in:
2023-11-26 01:11:09 -05:00
parent 2ee1bd5f1d
commit 6d568fbf34
+16
View File
@@ -0,0 +1,16 @@
import React from "react";
import { Icon } from '@iconify/react';
interface ProgressProps {
percent: number;
disableReturn?: boolean;
}
export default function Progress({percent, disableReturn}: ProgressProps) {
return <div className="flex gap-2 items-center">
{!disableReturn && <Icon icon="mdi:arrow-left" className="text-gray-400 text-2xl" />}
<div className="relative bg-gray-200 h-4 rounded-xl flex-1">
{percent > 0 && <div className="absolute bg-green h-4 rounded-xl" style={{width: `${percent}%`}}></div>}
</div>
</div>
}