import classNames from "@calcom/lib/classNames"; interface ISteps { maxSteps: number; currentStep: number; navigateToStep: (step: number) => void; stepLabel?: (currentStep: number, maxSteps: number) => string; } const Steps = (props: ISteps) => { const { maxSteps, currentStep, navigateToStep, stepLabel = (currentStep, totalSteps) => `Step ${currentStep} of ${totalSteps}`, } = props; return (

{stepLabel(currentStep, maxSteps)}

{new Array(maxSteps).fill(0).map((_s, index) => { return index <= currentStep - 1 ? (
navigateToStep(index)} className={classNames( "bg-inverted h-1 w-full rounded-[1px]", index < currentStep - 1 ? "cursor-pointer" : "" )} data-testid={`step-indicator-${index}`} /> ) : (
); })}
); }; export { Steps };