diff --git a/index.js b/index.js index f1018ef..60d2d38 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ 'use strict'; -import React, {Component, PropTypes} from 'react'; +import React, {Component} from 'react'; +import PropTypes from 'prop-types'; import { StyleSheet, View, @@ -8,7 +9,9 @@ import { Image, Dimensions, PixelRatio, - PanResponder + PanResponder, + ViewPropTypes, + TextStylePropTypes } from 'react-native'; class PickerAndroidItem extends Component{ @@ -34,9 +37,9 @@ export default class PickerAndroid extends Component{ static propTypes = { //picker's style - pickerStyle: View.propTypes.style, + pickerStyle: ViewPropTypes.style, //picker item's style - itemStyle: Text.propTypes.style, + itemStyle: TextStylePropTypes, //picked value changed then call this function onValueChange: PropTypes.func, //default to be selected value