()
| 110 | ) |
| 111 | |
| 112 | const Stepper: React.FC = () => { |
| 113 | const [currentStep, setCurrentStep] = useState(1) |
| 114 | |
| 115 | const handleNext = () => { |
| 116 | setCurrentStep((prev) => Math.min(prev + 1, steps.length - 1)) |
| 117 | } |
| 118 | |
| 119 | const handlePrev = () => { |
| 120 | setCurrentStep((prev) => Math.max(prev - 1, 0)) |
| 121 | } |
| 122 | |
| 123 | return ( |
| 124 | <div className="mx-auto w-full max-w-2xl p-6"> |
| 125 | <StepIndicator currentStep={currentStep} steps={steps} /> |
| 126 | <StepContent /> |
| 127 | <NavigationButtons |
| 128 | currentStep={currentStep} |
| 129 | totalSteps={steps.length} |
| 130 | handlePrev={handlePrev} |
| 131 | handleNext={handleNext} |
| 132 | /> |
| 133 | </div> |
| 134 | ) |
| 135 | } |
| 136 | |
| 137 | export default Stepper |
nothing calls this directly
no outgoing calls
no test coverage detected