UNPKG

vcc-ui

Version:

A React library for building user interfaces at Volvo Cars

24 lines (22 loc) 766 B
import { UseFieldOptions, UseFieldResults } from './use-field.d'; /** @deprecated */ export const useForm: ( /** Needs all the useFields that the Form should validate. */ ...fields: UseFieldOptions[] ) => { touchFields: () => void; /** Returns a submit function to submit the form with help from the form data and if the form is valid. */ submit: (callback: (isValid?: boolean, data?: any) => void) => void; /** Returns a reset function to reset the form. */ reset: () => void; }; /** @deprecated */ export const useFormDebugger: ( /** Needs all the useFields that the Form should validate. */ ...fields: UseFieldOptions[] ) => { data: Record<string, any>; fields: Record<string, UseFieldResults['initial']>; isValid: boolean; }; export {};