import { Fragment } from 'react'; import { CheckIcon } from './ReactIcons/CheckIcon'; type StepperStep = { label: string; onClick?: () => void; }; type StepperProps = { activeIndex: number; completeSteps: number[]; steps: StepperStep[]; }; export function Stepper(props: StepperProps) { const { steps, activeIndex = 0, completeSteps = [] } = props; return (
    {steps.map((step, stepCounter) => { const isComplete = completeSteps.includes(stepCounter); const isActive = activeIndex === stepCounter; const isLast = stepCounter === steps.length - 1; return (
  1. {isComplete && ( )} {!isComplete && ( {stepCounter + 1} )} {step.label}
  2. {!isLast && (
  3. )}
    ); })}
); }