mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
33 lines
856 B
TypeScript
33 lines
856 B
TypeScript
import React from 'react'
|
|
import styles from './Progress.module.scss'
|
|
|
|
const Progress = ({
|
|
currentStep,
|
|
steps
|
|
}: {
|
|
currentStep: number
|
|
steps: any[]
|
|
}) => {
|
|
return (
|
|
<ul className={styles.progress}>
|
|
{steps.map(({ title }, index) => (
|
|
<li
|
|
key={index}
|
|
className={
|
|
currentStep === index + 1
|
|
? styles.active
|
|
: currentStep > index + 1
|
|
? styles.completed
|
|
: styles.item
|
|
}
|
|
>
|
|
<span className={styles.number}>{index + 1}</span>
|
|
<span className={styles.label}>{title}</span>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
)
|
|
}
|
|
|
|
export default Progress
|