react-hook-form-generator
Version:
A [React](https://reactjs.org/) component to quickly and easily generate forms from object schema. Built with [React Hook Form](https://react-hook-form.com/) and [Chakra UI](https://chakra-ui.com/).
22 lines (21 loc) • 607 B
TypeScript
import { FC, BaseSyntheticEvent } from 'react';
import { UseFormOptions } from 'react-hook-form';
import { FormStyles, Schema } from '../types';
export interface FormProps {
title?: string;
schema: Schema;
handleSubmit: (values: any, e?: BaseSyntheticEvent) => void;
styles?: FormStyles;
overwriteDefaultStyles?: boolean;
formOptions?: UseFormOptions;
buttons?: {
reset?: {
text?: string;
hidden?: boolean;
};
submit?: {
text?: string;
};
};
}
export declare const Form: FC<FormProps>;