Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Here is an overview of the component usage.

* `style - {}` custom style of the list
* `optionStyle - {}` custom style of the option element
* `optionTextStyle - {}` custom style of the option text
* `options - []` required array of options
* `selectedOptions - []` optional array of initially selected options
* `maxSelectedOptions - int` optional maximum number of selectable options
Expand All @@ -43,5 +44,3 @@ Here is an overview of the component usage.
## Screenshot

![example](https://raw.githubusercontent.com/d-a-n/react-native-multiple-choice/master/assets/images/screenshot.png)


4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const propTypes = {
renderText: React.PropTypes.func,
style: View.propTypes.style,
optionStyle: View.propTypes.style,
optionTextStyle: View.propTypes.style,
disabled: PropTypes.bool
};
const defaultProps = {
Expand All @@ -31,6 +32,7 @@ const defaultProps = {
onSelection(option){},
style:{},
optionStyle:{},
optionTextStyle:{},
disabled: false
};

Expand Down Expand Up @@ -132,7 +134,7 @@ class MultipleChoice extends BaseComponent {
return this.props.renderText(option);
}

return (<Text>{option}</Text>);
return (<Text style={this.props.optionTextStyle}>{option}</Text>);
}

_renderRow(option) {
Expand Down