From f7205d99bfcde39dcb625eb1e367f303ee9023e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duy=20L=C6=B0=E1=BB=A3ng?= Date: Tue, 17 Oct 2017 11:08:11 +0700 Subject: [PATCH 1/4] use prop-types --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f1018ef..54916e0 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, From ae1bd60ec2a0d63d4985c085b0c792820652cd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duy=20L=C6=B0=E1=BB=A3ng?= Date: Wed, 18 Oct 2017 10:54:27 +0700 Subject: [PATCH 2/4] use proptypes --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 54916e0..6c07eda 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict'; -import React, {Component} from 'react'; +import React, {Component, ViewPropTypes, TextPropTypes} from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, @@ -35,9 +35,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: TextPropTypes.style, //picked value changed then call this function onValueChange: PropTypes.func, //default to be selected value From 7c26c608d6b7009f93f6dfd5c664e0c37641eb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duy=20L=C6=B0=E1=BB=A3ng?= Date: Wed, 18 Oct 2017 11:02:49 +0700 Subject: [PATCH 3/4] use proptypes --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 6c07eda..269221c 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict'; -import React, {Component, ViewPropTypes, TextPropTypes} from 'react'; +import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, @@ -9,7 +9,9 @@ import { Image, Dimensions, PixelRatio, - PanResponder + PanResponder, + ViewPropTypes, + TextPropTypes } from 'react-native'; class PickerAndroidItem extends Component{ From 9065429c095207425cf4a5c93693c2372576ff9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duy=20L=C6=B0=E1=BB=A3ng?= Date: Wed, 18 Oct 2017 11:16:47 +0700 Subject: [PATCH 4/4] use proptypes --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 269221c..60d2d38 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ import { PixelRatio, PanResponder, ViewPropTypes, - TextPropTypes + TextStylePropTypes } from 'react-native'; class PickerAndroidItem extends Component{ @@ -39,7 +39,7 @@ export default class PickerAndroid extends Component{ //picker's style pickerStyle: ViewPropTypes.style, //picker item's style - itemStyle: TextPropTypes.style, + itemStyle: TextStylePropTypes, //picked value changed then call this function onValueChange: PropTypes.func, //default to be selected value