You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
565 B

import React, { useState, useEffect } from "react";
function Progress({ percent }) {
const [delayPercent, setDelayPercent] = useState(0);
useEffect(() => {
setTimeout(() => {
setDelayPercent(() => percent);
}, 1000);
}, [percent]);
return (
<div className="flex-1 h-1.5 rounded-full overflow-hidden my-3" style={{ backgroundColor: '#D3E9FF' }}>
<div
className="h-full bg-blueEB transition-all duration-500 rounded-full"
style={{ width: delayPercent + "%" }}
></div>
</div>
);
}
export default Progress;