Open GeenCo86 opened 2 years ago
What is wrong:
StepWizard has the wrong type definition for the instance callback.
What I would expect:
interface StepWizardTransitionProps { enterRight?: string; enterLeft?: string; exitRight?: string; exitLeft?: string; intro?: string; } interface StepWizardInstanceProps { getHash: () => string; getTransitions: () => StepWizardTransitionProps; onHashChange: () => void; isInvalidStep: (next: number) => boolean; setActiveStep: (next: number) => void; // do we need onStepChange ?? currentStep: number; totalSteps: number; getSteps: () => ReactElement[]; firstStep: () => void; lastStep: () => void; nextStep: () => void; previousStep: () => void; goToStep: (step: number) => void; goToNamedStep: (stepName: string) => void; updateHash: (activeHash: string) => void; }
instance: (wizard: StepWizardInstanceProps) => void
+1 on this, StepWizardInstanceProps should also have the state prop with active step etc. @jcmcneal I can contribute this change if you believe this to be a real issue :pray:
StepWizardInstanceProps
state
What is wrong:
StepWizard has the wrong type definition for the instance callback.
What I would expect:
instance: (wizard: StepWizardInstanceProps) => void