react-form
Set of React form components based on react-formsy.
Install
npm install @doctolib/react-form
Usage
Form
Refer to formsy-react.
import {Form} from '@doctolib/react-form';
const Component = () => <Form/>;
Input
Input component.
import {Input} from '@doctolib/react-form';
const Component = () => <Input name="firstname"/>;
Textarea
Textarea component.
import {Textarea} from '@doctolib/react-form';
const Component = () => <Textarea name="comment"/>;
Select
Select component.
import {Select} from '@doctolib/react-form';
const Component = () => <Select options={{value: 'Label'}} name="select"/>;
InputAddon
Addon for input.
import {Input, InputAddon} from '@doctolib/react-form';
const Component = () => (
<Input
name="firstname"
leftAddon={<InputAddon>hey</InputAddon>}
rightAddon={<InputAddon>you</InputAddon>}
/>
);
## License
MIT