mirror of
https://github.com/mue/mue.git
synced 2026-07-12 19:52:53 +02:00
17 lines
423 B
JavaScript
17 lines
423 B
JavaScript
export default function ProgressBar(props) {
|
|
return (
|
|
<div className='progressbar'>
|
|
{props.count.map((num) => {
|
|
let className = 'step';
|
|
|
|
const index = props.count.indexOf(num);
|
|
if (index === props.currentTab) {
|
|
className = 'step active';
|
|
}
|
|
|
|
return <div className={className} key={index} onClick={() => props.switchTab(index)}></div>
|
|
})}
|
|
</div>
|
|
);
|
|
}
|