Skip to content

Commit

Permalink
Readme: Fix formatting of props and code example
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaello authored Apr 10, 2018
1 parent 1c87ac1 commit 3f20c37
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ this.setState({data: [{ id: 5, name: 'Red Apples' }]});

return (
<ModalSelector
data={this.state.data}
keyExtractor= {(item) => item.id}
labelExtractor= {(item) => item.name}/>
data={this.state.data}
keyExtractor= {item => item.id}
labelExtractor= {item => item.name}
/>
);
```

Expand All @@ -106,8 +107,8 @@ Prop | Type | Optional | Default | Description
`onChange` | function | Yes | () => {} | callback function, when the users has selected an option
`onModalOpen` | function | Yes | () => {} | callback function, when modal is opening
`onModalClose` | function | Yes | () => {} | callback function, when modal is closing
`keyExtractor | function | Yes | (data) => data.key | extract the key from the data item
`labelExtractor | function | Yes | (data) => data.label | extract the label from the data item
`keyExtractor`      | function | Yes     | (data) => data.key   | extract the key from the data item
`labelExtractor`    | function | Yes     | (data) => data.label | extract the label from the data item
`initValue` | string | Yes | `Select me!` | text that is initially shown on the button
`cancelText` | string | Yes | `cancel` | text of the cancel button
`animationType` | string | Yes | `slide` | type of animation to be used to show the modal. Must be one of `none`, `slide` or `fade`.
Expand Down

0 comments on commit 3f20c37

Please sign in to comment.