mirror of
https://github.com/mue/mue.git
synced 2026-07-28 11:11:08 +02:00
fix: search dropdown select, cleanup functional components
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
export default function ProgressBar(props) {
|
||||
export default function ProgressBar({ count, currentTab, switchTab }) {
|
||||
return (
|
||||
<div className='progressbar'>
|
||||
{props.count.map((num) => {
|
||||
{count.map((num) => {
|
||||
let className = 'step';
|
||||
|
||||
const index = props.count.indexOf(num);
|
||||
if (index === props.currentTab) {
|
||||
const index = count.indexOf(num);
|
||||
if (index === currentTab) {
|
||||
className = 'step active';
|
||||
}
|
||||
|
||||
return <div className={className} key={index} onClick={() => props.switchTab(index)}></div>;
|
||||
return <div className={className} key={index} onClick={() => switchTab(index)}></div>;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user