From 1395b0c3334b3199249e0701535c9d0dbe078da4 Mon Sep 17 00:00:00 2001 From: Azmat Ullah Date: Fri, 12 Jun 2020 20:02:51 +0500 Subject: [PATCH 1/2] Fixed propType issue with react-native version 0.62 --- src/components/affix/index.js | 4 ++-- src/components/helper/index.js | 4 ++-- src/components/label/index.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/affix/index.js b/src/components/affix/index.js index 0f85022e..1788c6d7 100644 --- a/src/components/affix/index.js +++ b/src/components/affix/index.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; -import { Animated } from 'react-native'; +import { Animated, Text } from 'react-native'; import styles from './styles'; @@ -11,7 +11,7 @@ export default class Affix extends PureComponent { static propTypes = { numberOfLines: PropTypes.number, - style: Animated.Text.propTypes.style, + style: Text.prototype, color: PropTypes.string.isRequired, fontSize: PropTypes.number.isRequired, diff --git a/src/components/helper/index.js b/src/components/helper/index.js index 6060f9f5..4d50d412 100644 --- a/src/components/helper/index.js +++ b/src/components/helper/index.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; -import { Animated } from 'react-native'; +import { Animated, Text } from 'react-native'; import styles from './styles'; @@ -11,7 +11,7 @@ export default class Helper extends PureComponent { disabled: PropTypes.bool, - style: Animated.Text.propTypes.style, + style: Text.prototype, baseColor: PropTypes.string, errorColor: PropTypes.string, diff --git a/src/components/label/index.js b/src/components/label/index.js index 82eaf033..519f82a7 100644 --- a/src/components/label/index.js +++ b/src/components/label/index.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; -import { Animated } from 'react-native'; +import { Animated, Text } from 'react-native'; import styles from './styles'; @@ -43,7 +43,7 @@ export default class Label extends PureComponent { y1: PropTypes.number, }), - style: Animated.Text.propTypes.style, + style: Text.prototype, label: PropTypes.string, }; From a3e18b89970ed0a604be877fdc2c95c660cee355 Mon Sep 17 00:00:00 2001 From: Azmat Ullah Date: Fri, 12 Jun 2020 21:02:28 +0500 Subject: [PATCH 2/2] Fixed typo --- src/components/affix/index.js | 2 +- src/components/helper/index.js | 2 +- src/components/label/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/affix/index.js b/src/components/affix/index.js index 1788c6d7..e2dede96 100644 --- a/src/components/affix/index.js +++ b/src/components/affix/index.js @@ -11,7 +11,7 @@ export default class Affix extends PureComponent { static propTypes = { numberOfLines: PropTypes.number, - style: Text.prototype, + style: Text.propType, color: PropTypes.string.isRequired, fontSize: PropTypes.number.isRequired, diff --git a/src/components/helper/index.js b/src/components/helper/index.js index 4d50d412..98b3c645 100644 --- a/src/components/helper/index.js +++ b/src/components/helper/index.js @@ -11,7 +11,7 @@ export default class Helper extends PureComponent { disabled: PropTypes.bool, - style: Text.prototype, + style: Text.propType, baseColor: PropTypes.string, errorColor: PropTypes.string, diff --git a/src/components/label/index.js b/src/components/label/index.js index 519f82a7..2b9038d8 100644 --- a/src/components/label/index.js +++ b/src/components/label/index.js @@ -43,7 +43,7 @@ export default class Label extends PureComponent { y1: PropTypes.number, }), - style: Text.prototype, + style: Text.propType, label: PropTypes.string, };