Completed more of the home page of the new designs
This commit is contained in:
@@ -8,9 +8,15 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function ProgressBar({label, percentage, color, className}: Props) {
|
||||
const progressColorClass: {[key in typeof color]: string} = {
|
||||
blue: "bg-mti-blue-light",
|
||||
orange: "bg-mti-orange-light",
|
||||
green: "bg-mti-green-light",
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={clsx("relative rounded-full bg-gray-200 overflow-hidden flex items-center justify-center", className)}>
|
||||
<div style={{width: `${percentage}%`}} className={clsx("absolute top-0 left-0 h-full overflow-hidden", `bg-mti-${color}-light`)} />
|
||||
<div className={clsx("relative rounded-full bg-mti-gray-anti-flash overflow-hidden flex items-center justify-center", className)}>
|
||||
<div style={{width: `${percentage}%`}} className={clsx("absolute top-0 left-0 h-full overflow-hidden", progressColorClass[color])} />
|
||||
<span className="z-10 justify-self-center text-white text-sm font-bold">{label}</span>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user