diff --git a/README.md b/README.md index 6d452d917a9bb38ba3c6bd3b9d4ecfa2f61cf7c9..d9e75647862c382ca3c2e41a1ac59de75006e6ce 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Needs react-native >= 0.14.2 ###Documentation ####Props +- style style of picker - pickerBtnText string, tool bar's confirm btn text - pickerCancelBtnText string, tool bar's cancel ben text - pickerBtnStyle textStylePropType, tool bar's btn style diff --git a/index.js b/index.js index a535c1f6d30f7570332725495fdbb72e22b695d7..141bce575ce3d1202ed046dbe6a44dc75dbf6286 100644 --- a/index.js +++ b/index.js @@ -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 { + }, this.state.style]}>