File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 11export type Handler = ( ( ) => Promise < void > ) | ( ( ) => void ) | null ;
22
33export type WizardProps = {
4+ /** Optional header that is shown above the active step */
45 header ?: React . ReactNode ;
6+ /** Optional footer that is shown below the active step */
57 footer ?: React . ReactNode ;
68} ;
79
810export type WizardValues = {
11+ /** Go to the next step */
912 nextStep : ( ) => Promise < void > ;
13+ /** Go to the previous step */
1014 previousStep : ( ) => void ;
15+ /**
16+ * Connect a callback that will be called when calling `nextStep()`
17+ *
18+ * @param handler Can be either sync or async
19+ *
20+ */
1121 handleStep : ( handler : Handler ) => void ;
22+ /**
23+ * Indicate the current state of the handler
24+ *
25+ * Will reflect the handler promise state: will be `true` if the handler promise is pending and
26+ * `false` when the handler is either fulfilled or rejected
27+ */
1228 isLoading : boolean ;
29+ /** The urrent active step of the wizard */
1330 activeStep : number ;
31+ /** Indicate if the current step is the first step (aka no previous step) */
1432 isFirstStep : boolean ;
33+ /** Indicate if the current step is the last step (aka no next step) */
1534 isLastStep : boolean ;
1635} | null ;
You can’t perform that action at this time.
0 commit comments