mue/src/components/modals/welcome/ProgressBar.jsx

21 lines
474 B
React
Raw Normal View History

2022-10-30 16:56:26 +00:00
import { memo } from 'react';
function ProgressBar({ count, currentTab, switchTab }) {
return (
<div className="progressbar">
{count.map((num) => {
let className = 'step';
const index = count.indexOf(num);
if (index === currentTab) {
className = 'step active';
}
return <div className={className} key={index} onClick={() => switchTab(index)} />;
})}
</div>
);
}
2022-10-30 16:56:26 +00:00
2022-11-06 11:59:59 +00:00
export default memo(ProgressBar);