mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
24 lines
518 B
TypeScript
24 lines
518 B
TypeScript
|
import classNames from 'classnames'
|
||
|
|
||
|
export function Stepper({ steps, active }: { steps: number; active: number }) {
|
||
|
return (
|
||
|
<div
|
||
|
className="stepper"
|
||
|
role="progressbar"
|
||
|
aria-valuenow={active + 1}
|
||
|
aria-valuemax={steps}
|
||
|
>
|
||
|
{Array.from({ length: steps }).map((_, i) => (
|
||
|
<div
|
||
|
key={i}
|
||
|
className={classNames({
|
||
|
step: true,
|
||
|
active: i === active,
|
||
|
completed: i < active,
|
||
|
})}
|
||
|
/>
|
||
|
))}
|
||
|
</div>
|
||
|
)
|
||
|
}
|