From b1c8e043e225b819c71080eac27a224f9baf3a8b Mon Sep 17 00:00:00 2001 From: Davide Date: Wed, 3 Apr 2019 18:05:07 +0200 Subject: [PATCH] prop-types compatibility react native > 0.55 Fix prop-types compatibility for react native > 0.55 --- index.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 };