import type { FC } from 'react' import type { Step } from './step' import { StepperStep } from './step' export type StepperProps = { steps: Step[] activeIndex: number } function join(array: T[], sep: R): Array { return array.reduce((acc, item, index) => { if (index === 0) return [item] return acc.concat([sep, item]) }, [] as Array) } export const Stepper: FC = (props) => { const { steps, activeIndex } = props return
{join( steps.map((step, index) => ( )),
, )}
}