Skip to content

Commit

Permalink
Merge pull request #165 from ayuleul/fix-propType-issue
Browse files Browse the repository at this point in the history
Migrate PropTypes
  • Loading branch information
Corné Dorrestijn committed Aug 29, 2022
2 parents ca4159e + e7fad2c commit 467fb48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 467fb48

Please sign in to comment.