react-vite-themes
Version:
A test/experimental React theme system created for learning purposes. Features atomic design components, SCSS variables, and dark/light theme support. Not intended for production use.
33 lines • 1.24 kB
TypeScript
interface Step {
id: string;
title: string;
description?: string;
content: React.ReactNode;
}
interface MultiStepFormContextType {
currentStep: number;
totalSteps: number;
formData: Record<string, unknown>;
updateField: (name: string, value: unknown) => void;
nextStep: () => void;
prevStep: () => void;
goToStep: (step: number) => void;
isFirstStep: boolean;
isLastStep: boolean;
isStepValid: (step: number) => boolean;
isSubmitting: boolean;
handleNext: () => Promise<void>;
handlePrev: () => void;
handleSubmit: () => Promise<void>;
validateCurrentStep: () => Promise<boolean>;
triggerFormValidation: () => Promise<void>;
}
declare const MultiStepFormContext: import("react").Context<MultiStepFormContextType | null>;
export declare const useMultiStepForm: () => MultiStepFormContextType;
export declare const useMultiStepFormState: (steps: Step[], initialData?: Record<string, unknown>, onSubmit?: (data: Record<string, unknown>) => void) => {
contextValue: MultiStepFormContextType;
handleSubmit: () => Promise<void>;
};
export { MultiStepFormContext };
export type { MultiStepFormContextType, Step };
//# sourceMappingURL=useMultiStepForm.d.ts.map