Skip to content

Commit

Permalink
fix: Fix peer dependency and remove prop-types.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVann committed Jul 5, 2019
1 parent 81ab7d5 commit 44a4c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,14 @@
"metro-react-native-babel-preset": "^0.55.0",
"prettier": "^1.18.2",
"prettier-check": "^2.0.0",
"prop-types": "^15.7.2",
"react": "16.8.6",
"react-native": "^0.60.0",
"react-test-renderer": "16.8.6",
"semantic-release": "^15.13.18"
},
"peerDependencies": {
"prop-types": "^15.7.2",
"react": "^16.8.3",
"react-native": "^0.59.5"
"react": "^16.8.6",
"react-native": "^0.60.0"
},
"release": {
"plugins": [
Expand Down
21 changes: 0 additions & 21 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React, { forwardRef, memo } from 'react'
import PropTypes from 'prop-types'
import {
View,
Image,
NativeModules,
requireNativeComponent,
ViewPropTypes,
StyleSheet,
} from 'react-native'

Expand Down Expand Up @@ -111,25 +109,6 @@ FastImage.defaultProps = {
resizeMode: FastImage.resizeMode.cover,
}

const FastImageSourcePropType = PropTypes.shape({
uri: PropTypes.string,
headers: PropTypes.objectOf(PropTypes.string),
priority: PropTypes.oneOf(Object.keys(FastImage.priority)),
cache: PropTypes.oneOf(Object.keys(FastImage.cacheControl)),
})

FastImage.propTypes = {
...ViewPropTypes,
source: PropTypes.oneOfType([FastImageSourcePropType, PropTypes.number]),
tintColor: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
onLoadStart: PropTypes.func,
onProgress: PropTypes.func,
onLoad: PropTypes.func,
onError: PropTypes.func,
onLoadEnd: PropTypes.func,
fallback: PropTypes.bool,
}

const FastImageView = requireNativeComponent('FastImageView', FastImage, {
nativeOnly: {
onFastImageLoadStart: true,
Expand Down

0 comments on commit 44a4c8b

Please sign in to comment.