Started improving the responsiveness of the application
This commit is contained in:
@@ -7,9 +7,10 @@ interface Props {
|
||||
color: "red" | "rose" | "purple" | Module;
|
||||
useColor?: boolean;
|
||||
className?: string;
|
||||
textClassName?: string;
|
||||
}
|
||||
|
||||
export default function ProgressBar({label, percentage, color, useColor = false, className}: Props) {
|
||||
export default function ProgressBar({label, percentage, color, useColor = false, className, textClassName}: Props) {
|
||||
const progressColorClass: {[key in typeof color]: string} = {
|
||||
red: "bg-mti-red-light",
|
||||
rose: "bg-mti-rose-light",
|
||||
@@ -32,7 +33,7 @@ export default function ProgressBar({label, percentage, color, useColor = false,
|
||||
style={{width: `${percentage}%`}}
|
||||
className={clsx("absolute transition-all duration-300 ease-in-out 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>
|
||||
<span className={clsx("z-10 justify-self-center text-white text-sm font-bold", textClassName)}>{label}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user