MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / updateStep

Function updateStep

src/ts-tailwind/Components/Stepper/Stepper.tsx:49–56  ·  view source on GitHub ↗
(newStep: number)

Source from the content-addressed store, hash-verified

47 const isLastStep = currentStep === totalSteps;
48
49 const updateStep = (newStep: number) => {
50 setCurrentStep(newStep);
51 if (newStep > totalSteps) {
52 onFinalStepCompleted();
53 } else {
54 onStepChange(newStep);
55 }
56 };
57
58 const handleBack = () => {
59 if (currentStep > 1) {

Callers 4

handleBackFunction · 0.70
handleNextFunction · 0.70
handleCompleteFunction · 0.70
StepperFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected