mui-hook-form-generator

1.0.4 • Public • Published

mui-hook-form-generator

NPM JavaScript Style Guide

Install

npm i --save mui-hook-form-generator

Usage

import React from 'react'

import FormGenerator from 'mui-hook-form-generator'
import { useForm } from 'react-hook-form'

export default function Component {
  const { control } = useForm({})
  render() {
    return <FormGenerator
    control={control}
    rootProps={{ spacing: 2 }}
    child={[
      { type: "text", name:"name", label: "Name", gridProps: { xs: 12 }},
      { type: "select", name:"selectField", label: "Select Field", gridProps: { xs: 12 }},
      { type: "password", name:"password", label: "Password", gridProps: { xs: 12 }},
      { type: "date", name:"date", label: "Date", gridProps: { xs: 12 }},
    ]}
    />
  }
}

License

MIT ©

Readme

Keywords

none

Package Sidebar

Install

npm i mui-hook-form-generator

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

60.1 kB

Total Files

7

Last publish

Collaborators

  • bobytudu2000