Commit 034044eb authored by xwenliang's avatar xwenliang

add style for picker

parent 90451c37
......@@ -22,6 +22,7 @@ Needs react-native >= 0.14.2
###Documentation
####Props
- <b>style</b> style of picker
- <b>pickerBtnText</b> string, tool bar's confirm btn text
- <b>pickerCancelBtnText</b> string, tool bar's cancel ben text
- <b>pickerBtnStyle</b> textStylePropType, tool bar's btn style
......
......@@ -70,6 +70,7 @@ export default class PickerAny extends React.Component {
_getStateFromProps(props){
//the pickedValue must looks like [wheelone's, wheeltwo's, ...]
//this.state.selectedValue may be the result of the first pickerWheel
let style = props.style;
let pickerBtnText = props.pickerBtnText;
let pickerCancelBtnText = props.pickerCancelBtnText;
let pickerBtnStyle = props.pickerBtnStyle;
......@@ -116,6 +117,7 @@ export default class PickerAny extends React.Component {
this.pickedValue = JSON.parse(JSON.stringify(selectedValue));
this.pickerStyle = pickerStyle;
return {
style,
pickerBtnText,
pickerCancelBtnText,
pickerBtnStyle,
......@@ -458,7 +460,7 @@ export default class PickerAny extends React.Component {
<Animated.View style={[styles.picker, {
height: this.state.pickerHeight,
bottom: this.state.slideAnim
}]}>
}, this.state.style]}>
<View style={[styles.pickerToolbar, this.state.pickerToolBarStyle]}>
<View style={styles.pickerCancelBtn}>
<Text style={[styles.pickerFinishBtnText, this.state.pickerBtnStyle]}
......
{
"name": "react-native-picker",
"version": "0.4.0",
"version": "0.4.1",
"description": "react-native-picker",
"main": "index.js",
"scripts": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment