Commit 04946f59 authored by xwenliang's avatar xwenliang

issue#27

parent 743677cb
...@@ -23,6 +23,7 @@ Needs react-native >= 0.14.2 ...@@ -23,6 +23,7 @@ Needs react-native >= 0.14.2
####Props ####Props
- <b>style</b> style of picker, you can set width and height of picker in this prop - <b>style</b> style of picker, you can set width and height of picker in this prop
- <b>pickerElevation</b> elevation of picker (for issue https://github.com/beefe/react-native-picker/issues/27)
- <b>pickerBtnText</b> string, tool bar's confirm btn text - <b>pickerBtnText</b> string, tool bar's confirm btn text
- <b>pickerCancelBtnText</b> string, tool bar's cancel ben text - <b>pickerCancelBtnText</b> string, tool bar's cancel ben text
- <b>pickerBtnStyle</b> textStylePropType, tool bar's btn style - <b>pickerBtnStyle</b> textStylePropType, tool bar's btn style
......
...@@ -25,6 +25,7 @@ export default class PickerAny extends React.Component { ...@@ -25,6 +25,7 @@ export default class PickerAny extends React.Component {
static propTypes = { static propTypes = {
style: PropTypes.any, style: PropTypes.any,
pickerElevation: PropTypes.number,
pickerBtnText: PropTypes.string, pickerBtnText: PropTypes.string,
pickerCancelBtnText: PropTypes.string, pickerCancelBtnText: PropTypes.string,
pickerBtnStyle: PropTypes.any, pickerBtnStyle: PropTypes.any,
...@@ -76,6 +77,7 @@ export default class PickerAny extends React.Component { ...@@ -76,6 +77,7 @@ export default class PickerAny extends React.Component {
//this.state.selectedValue may be the result of the first pickerWheel //this.state.selectedValue may be the result of the first pickerWheel
let { let {
style, style,
pickerElevation,
pickerBtnText, pickerBtnText,
pickerCancelBtnText, pickerCancelBtnText,
pickerBtnStyle, pickerBtnStyle,
...@@ -124,6 +126,7 @@ export default class PickerAny extends React.Component { ...@@ -124,6 +126,7 @@ export default class PickerAny extends React.Component {
this.pickerStyle = pickerStyle; this.pickerStyle = pickerStyle;
return { return {
style, style,
pickerElevation,
pickerBtnText, pickerBtnText,
pickerCancelBtnText, pickerCancelBtnText,
pickerBtnStyle, pickerBtnStyle,
...@@ -442,6 +445,7 @@ export default class PickerAny extends React.Component { ...@@ -442,6 +445,7 @@ export default class PickerAny extends React.Component {
return ( return (
<Animated.View style={[styles.picker, { <Animated.View style={[styles.picker, {
elevation: this.state.pickerElevation,
width: longSide, width: longSide,
height: this.state.showMask ? height : this.state.style.height, height: this.state.showMask ? height : this.state.style.height,
bottom: this.state.slideAnim bottom: this.state.slideAnim
......
{ {
"name": "react-native-picker", "name": "react-native-picker",
"version": "2.0.3", "version": "2.0.4",
"description": "react-native-picker", "description": "react-native-picker",
"main": "index.js", "main": "index.js",
"scripts": { "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