Skip to content

Commit

Permalink
Merge pull request #48 from mayaa6/proptypes
Browse files Browse the repository at this point in the history
Migrating from React.PropTypes
  • Loading branch information
jeanpan authored Aug 11, 2017
2 parents e8f84e6 + 4f44000 commit 7baff02
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
13 changes: 7 additions & 6 deletions ImageItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Dimensions,
TouchableOpacity,
} from 'react-native';
import PropTypes from 'prop-types';

class ImageItem extends Component {
constructor(props){
Expand Down Expand Up @@ -65,12 +66,12 @@ ImageItem.defaultProps = {
}

ImageItem.propTypes = {
item: React.PropTypes.object,
selected: React.PropTypes.bool,
selectedMarker: React.PropTypes.element,
imageMargin: React.PropTypes.number,
imagesPerRow: React.PropTypes.number,
onClick: React.PropTypes.func,
item: PropTypes.object,
selected: PropTypes.bool,
selectedMarker: PropTypes.element,
imageMargin: PropTypes.number,
imagesPerRow: PropTypes.number,
onClick: PropTypes.func,
}

export default ImageItem;
34 changes: 18 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
ListView,
ActivityIndicator,
} from 'react-native';
import PropTypes from 'prop-types';

import ImageItem from './ImageItem';

class CameraRollPicker extends Component {
Expand Down Expand Up @@ -244,11 +246,11 @@ const styles = StyleSheet.create({
})

CameraRollPicker.propTypes = {
scrollRenderAheadDistance: React.PropTypes.number,
initialListSize: React.PropTypes.number,
pageSize: React.PropTypes.number,
removeClippedSubviews: React.PropTypes.bool,
groupTypes: React.PropTypes.oneOf([
scrollRenderAheadDistance: PropTypes.number,
initialListSize: PropTypes.number,
pageSize: PropTypes.number,
removeClippedSubviews: PropTypes.bool,
groupTypes: PropTypes.oneOf([
'Album',
'All',
'Event',
Expand All @@ -257,21 +259,21 @@ CameraRollPicker.propTypes = {
'PhotoStream',
'SavedPhotos',
]),
maximum: React.PropTypes.number,
assetType: React.PropTypes.oneOf([
maximum: PropTypes.number,
assetType: PropTypes.oneOf([
'Photos',
'Videos',
'All',
]),
selectSingleItem: React.PropTypes.bool,
imagesPerRow: React.PropTypes.number,
imageMargin: React.PropTypes.number,
containerWidth: React.PropTypes.number,
callback: React.PropTypes.func,
selected: React.PropTypes.array,
selectedMarker: React.PropTypes.element,
backgroundColor: React.PropTypes.string,
emptyText: React.PropTypes.string,
selectSingleItem: PropTypes.bool,
imagesPerRow: PropTypes.number,
imageMargin: PropTypes.number,
containerWidth: PropTypes.number,
callback: PropTypes.func,
selected: PropTypes.array,
selectedMarker: PropTypes.element,
backgroundColor: PropTypes.string,
emptyText: PropTypes.string,
emptyTextStyle: Text.propTypes.style,
}

Expand Down

4 comments on commit 7baff02

@silentcloud
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeanpan Can you release a version?

@silentcloud
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeanpan
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silentcloud
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeanpan Thanks, my fault, I ignored the tag

Please sign in to comment.