Skip to content

Commit 840c6b0

Browse files
committed
add itemStyle support
1 parent 6d48aa3 commit 840c6b0

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Needs react-native >= 0.14.2
66

77
###Documentation
88

9+
- <b>itemStyle</b> itemStylePropType
910
- <b>selectedValue</b> any
1011
- <b>onValueChange</b> function
1112
- <b>moveUp</b> when called, the wheel will go up, which will trigger onValueChange

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ var PickerAndroid = React.createClass({
157157
var upItems = [], middleItems = [], downItems = [];
158158
items.forEach((item, index) => {
159159
upItems[index] = ( <Text
160-
style={styles.upText}
160+
style={[styles.upText, this.props.itemStyle]}
161161
onPress={() => {
162162
this._moveTo(index);
163163
}} >
164164
{item.label}
165165
</Text> );
166-
middleItems[index] = ( <Text style={styles.middleText}>{item.label}</Text> );
166+
middleItems[index] = ( <Text style={[styles.middleText, this.props.itemStyle]}>{item.label}</Text> );
167167
downItems[index] = ( <Text
168-
style={styles.downText}
168+
style={[styles.downText, this.props.itemStyle]}
169169
onPress={() => {
170170
this._moveTo(index);
171171
}} >

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-picker-android",
3-
"version": "0.2.3",
3+
"version": "0.2.4",
44
"description": "react-native-picker-android",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)