From 32ecc3b5cedc1162706839e1a6e841996c72e69e Mon Sep 17 00:00:00 2001 From: Vitor Cavalcanti Date: Fri, 7 Oct 2016 17:57:33 -0300 Subject: [PATCH] New option to stylize the text of options. --- README.md | 3 +-- index.js | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 882c020..1ef09d6 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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) - - diff --git a/index.js b/index.js index a9037fe..3ec2326 100644 --- a/index.js +++ b/index.js @@ -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 = { @@ -31,6 +32,7 @@ const defaultProps = { onSelection(option){}, style:{}, optionStyle:{}, + optionTextStyle:{}, disabled: false }; @@ -132,7 +134,7 @@ class MultipleChoice extends BaseComponent { return this.props.renderText(option); } - return ({option}); + return ({option}); } _renderRow(option) {