Skip to content

Commit

Permalink
readme fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mprzodala committed Mar 14, 2017
1 parent c50057c commit e4d0641
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ You can submit your form outside form context by use FormEventsListener. Form re
| unregisterEvent | name: String |
| callEvent | name: String<br />data: Any |



####How create new field

If You want create Your own custom field You must create component that use onChange method from props when value is changed and on export use FieldConnect method. FieldConnect will wrap Your field component and give props from form to Your field. Abow You have example of custom text field that have icon.

```js
import React from 'react';
import { FieldConnect, ErrorField } from 'react-components-form';
Expand Down Expand Up @@ -194,6 +194,7 @@ export default FieldConnect(CustomTextField);
You can define any form. Abow You have example of login and registration form.

####Example of login form

```js
import React from 'react';
import { Form, TextField, SubmitField } from 'react-components-form';
Expand Down Expand Up @@ -226,6 +227,7 @@ export default LoginForm;
```

####Example of login form in edit mode

```js
import React from 'react';
import { Form, TextField, SubmitField } from 'react-components-form';
Expand Down Expand Up @@ -264,6 +266,7 @@ export default LoginForm;
```

####Example of login form with FormEventsListener submit

```js
import React from 'react';
import { Form, FormEventsListener, TextField, SubmitField } from 'react-components-form';
Expand Down Expand Up @@ -302,6 +305,7 @@ export default LoginForm;
```

####Example of registration form

```js
import React from 'react';
import Schema from 'form-schema-validation';
Expand Down Expand Up @@ -373,8 +377,8 @@ const RegistrationForm = () => (
export default RegistrationForm;
```


####Example of use SelectField

```js
import React from 'react';
import { Form, SelectField, SubmitField } from 'react-components-form';
Expand Down

0 comments on commit e4d0641

Please sign in to comment.