mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
b516363e45
* onboarding data collection react * added stepper component * stepper completed step * move useValidateField to shared * Revert "move useValidateField to shared" This reverts commit 68fafd934dafedab8d61f581beb7bfdd8a0674c0. * added multistep hook * add story * fix storybook * img path * remove pug page * formatting * using translations * formating * linting * use small classname * Onboarding data collection form - Step 2 (#15182) * step 2 of onbarding data collection form * sort locals * styling changes * checkbox font size * aria-progressbar, bsStyle=null GitOrigin-RevId: 9ee84b4631b30b670280cfa2086385274652b21e
23 lines
518 B
TypeScript
23 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>
|
|
)
|
|
}
|