UNPKG

react-multistep-forms

Version:

Flexible and customizable multi-step form context for React with native React Hook Form integration.

21 lines 795 B
/** * A custom hook for accessing the `MultistepFormContext`. * * - Provides access to the current step, navigation functions, and step field mappings. * - Ensures that the hook is used within a `MultistepFormProvider`. * * @throws {Error} If the hook is used outside of a `MultistepFormProvider`. * * @returns {MultistepFormContextType} The context value containing the multi-step form state and functions. */ export declare function useMultistepForm(): { currentStepIndex: number; currentStepKey: string; stepFields: Record<string, string[]>; setStepFields: React.Dispatch<React.SetStateAction<Record<string, string[]>>>; nextStep: () => void; prevStep: () => void; submit: () => void; steps: string[]; }; //# sourceMappingURL=useMultistepForm.d.ts.map