MCPcopy Create free account
hub / github.com/SyntaxUI/syntaxui / Stepper

Function Stepper

src/showcase/components/stepper/DottedStepper.tsx:112–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110)
111
112const 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
137export default Stepper

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected