@crpt/react-form
v1.0.18
Published
react-form React component
Downloads
33
Keywords
Readme
react-form
Form
Form component. Can be used to wrap Input, Select and DatePicker components. Can simplify mass event handling for a set of components.
Usage
import { Form } from "@crpt/react-form";
import { DatePicker } from "@crpt/react-datepicker";
<Form onSubmit={vals => console.log('vals', vals)}>
<DatePicker name="date" />
</Form>
Form
| PropName | Description | Example |
|---|---|---|
| onSubmit: String | Called on submit. | <Form onSubmit={vals => console.log('vals', vals)}>
|
| onCollapse: Function | Called on collapse. | <Form onCollapse={() => console.log('collapsed')}>
|
| onClear: Function | Called on clear. | <Form onClear={() => console.log('cleared')}>
|