Skip to content

Commit

Permalink
Switched to the prop-types npm packages instead of React.PropTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
ihor committed Sep 9, 2017
1 parent 318e1b4 commit 340a624
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
.idea
node_modules/
11 changes: 6 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Image, TouchableOpacity } from 'react-native';
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';

Expand Down Expand Up @@ -81,9 +82,9 @@ export default class ScalableImage extends React.Component {
}

ScalableImage.propTypes = {
width: React.PropTypes.number,
height: React.PropTypes.number,
maxWidth: React.PropTypes.number,
maxHeight: React.PropTypes.number,
onPress: React.PropTypes.func,
width: PropTypes.number,
height: PropTypes.number,
maxWidth: PropTypes.number,
maxHeight: PropTypes.number,
onPress: PropTypes.func,
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-scalable-image",
"version": "0.2.0",
"version": "0.2.1",
"license": "MIT",
"description": "React Native Image component which scales width or height automatically to keep the aspect ratio",
"keywords": [
Expand All @@ -27,6 +27,7 @@
"dependencies": {},
"devDependencies": {},
"peerDependencies": {
"prop-types": "^15.5.10",
"react": "^15.4",
"react-native": "^0.41.2"
},
Expand Down

0 comments on commit 340a624

Please sign in to comment.