diff --git a/index.js b/index.js index d65bf4c0..f25f2182 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,7 @@ 'use strict'; -import React,{ - PropTypes -} from 'react'; +import PropTypes from 'prop-types'; +import React from 'react'; import { View, @@ -12,7 +11,8 @@ import { Text, ScrollView, TouchableOpacity, - Platform + Platform, + ViewPropTypes } from 'react-native'; import styles from './style'; @@ -24,15 +24,15 @@ const propTypes = { data: PropTypes.array, onChange: PropTypes.func, initValue: PropTypes.string, - style: View.propTypes.style, - selectStyle: View.propTypes.style, - optionStyle: View.propTypes.style, + style: ViewPropTypes.style, + selectStyle: ViewPropTypes.style, + optionStyle: ViewPropTypes.style, optionTextStyle: Text.propTypes.style, - sectionStyle: View.propTypes.style, + sectionStyle: ViewPropTypes.style, sectionTextStyle: Text.propTypes.style, - cancelStyle: View.propTypes.style, + cancelStyle: ViewPropTypes.style, cancelTextStyle: Text.propTypes.style, - overlayStyle: View.propTypes.style, + overlayStyle: ViewPropTypes.style, cancelText: PropTypes.string };