use-form-fields
Version:
[Demo](https://vlad88vlad.github.io/use-form-fields)
20 lines (19 loc) • 826 B
TypeScript
import { formSchemaType, getFormFieldsType, formFields } from './types';
export declare const getValue: (type?: string, value?: unknown, checked?: boolean) => unknown;
export declare const toJSON: <T>(fields: formSchemaType) => T;
export declare const formTypeFields: {
radio: (field: any, name: any, onChange: any, fieldProps: any) => {
radioOptions: any;
};
checkbox: (field: any, name: any, onChange: any, fieldProps: any) => {
fieldProps: any;
};
};
export declare const getFieldProps: ({ type, field, name, onChange, fieldProps, }: {
type?: string | undefined;
field: any;
name: any;
onChange: any;
fieldProps: any;
}) => any;
export declare const getFormFields: ({ fields, onChange, toValid, setValue, setError, }: getFormFieldsType) => formFields;