From e7fad2ce7bf3e47c544464ceeaa2d727e821b196 Mon Sep 17 00:00:00 2001 From: Leul Ayalew Date: Sat, 27 Aug 2022 17:05:02 +0300 Subject: [PATCH] Migrate to PropTypes --- index.js | 9 +++++---- package.json | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 61c3f94..139fcb3 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { Image, ImageBackground, Platform, StyleSheet, Text, TextInput, TouchableOpacity, View, ViewPropTypes } from 'react-native'; +import { Image, ImageBackground, Platform, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native'; +import { ViewPropTypes, ImagePropTypes } from 'deprecated-react-native-prop-types'; import Icon from 'react-native-vector-icons/MaterialIcons'; import Video from 'react-native-video'; // eslint-disable-line @@ -594,8 +595,8 @@ export default class VideoPlayer extends Component { VideoPlayer.propTypes = { video: Video.propTypes.source, - thumbnail: Image.propTypes.source, - endThumbnail: Image.propTypes.source, + thumbnail: ImagePropTypes.source, + endThumbnail: ImagePropTypes.source, videoWidth: PropTypes.number, videoHeight: PropTypes.number, duration: PropTypes.number, @@ -629,7 +630,7 @@ VideoPlayer.propTypes = { seekBarKnob: ViewPropTypesVar.style, seekBarKnobSeeking: ViewPropTypesVar.style, seekBarBackground: ViewPropTypesVar.style, - thumbnail: Image.propTypes.style, + thumbnail: ImagePropTypes.style, playButton: ViewPropTypesVar.style, playArrow: Icon.propTypes.style, durationText: ViewPropTypesVar.style diff --git a/package.json b/package.json index bc7b44a..5fc4a39 100644 --- a/package.json +++ b/package.json @@ -29,5 +29,8 @@ "eslint-plugin-import": "^1.14.0", "eslint-plugin-jsx-a11y": "^2.2.1", "eslint-plugin-react": "^6.2.0" + }, + "dependencies": { + "deprecated-react-native-prop-types": "^2.3.0" } }