Skip to content

Commit

Permalink
fix(PropTypes): Fixes PropTypes and support RN 0.45.1<
Browse files Browse the repository at this point in the history
For RN 0.45.1 <, PropTypes have been switched to a different package 'prop-types'. Earlier it was part of the 'react' package. Please update.
  • Loading branch information
ketn authored and st0ffern committed Nov 11, 2017
1 parent 97e1603 commit 968c689
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/ImageCrop.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import {
View,
Image,
Expand Down Expand Up @@ -208,16 +209,16 @@ ImageCrop.defaultProps = {
filePath: ''
}
ImageCrop.propTypes = {
image: React.PropTypes.string.isRequired,
cropWidth: React.PropTypes.number.isRequired,
cropHeight: React.PropTypes.number.isRequired,
zoomFactor: React.PropTypes.number,
maxZoom: React.PropTypes.number,
minZoom: React.PropTypes.number,
quality: React.PropTypes.number,
pixelRatio: React.PropTypes.number,
type: React.PropTypes.string,
format: React.PropTypes.string,
filePath: React.PropTypes.string
image: PropTypes.string.isRequired,
cropWidth: PropTypes.number.isRequired,
cropHeight: PropTypes.number.isRequired,
zoomFactor: PropTypes.number,
maxZoom: PropTypes.number,
minZoom: PropTypes.number,
quality: PropTypes.number,
pixelRatio: PropTypes.number,
type: PropTypes.string,
format: PropTypes.string,
filePath: PropTypes.string
}
module.exports=ImageCrop

0 comments on commit 968c689

Please sign in to comment.