From 7bd490d7cd9433788aa63b8bdf19f4d4d849c2e7 Mon Sep 17 00:00:00 2001 From: Frank Harrison Date: Thu, 16 Dec 2021 12:56:11 +0000 Subject: [PATCH] PropTypes was moved to 'prop-types' this follows that change --- index.js | 3 ++- lib/sidebar.js | 3 ++- lib/title.js | 5 +++-- package.json | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index fb89c96..dd270c5 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { StyleSheet, Text, diff --git a/lib/sidebar.js b/lib/sidebar.js index a7a2ed1..36efba4 100644 --- a/lib/sidebar.js +++ b/lib/sidebar.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { StyleSheet, Text, diff --git a/lib/title.js b/lib/title.js index 9e0c8f6..1a7ec5a 100644 --- a/lib/title.js +++ b/lib/title.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { Text } from 'react-native'; export default class Title extends Component { @@ -26,4 +27,4 @@ const styles = { alignSelf: 'stretch', backgroundColor: 'black' } -} \ No newline at end of file +} diff --git a/package.json b/package.json index e12c3af..4b57fb8 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ }, "homepage": "https://github.com/machadogj/react-native-components-viewer", "dependencies": { + "prop-types": "^15.7.2", "react-native-layout-tester": "^1.0.5" }, "devDependencies": {