From 40e4e0d6f8e739781e303da97db8abbfd2848972 Mon Sep 17 00:00:00 2001 From: Attila Gazso Date: Mon, 25 May 2020 13:38:40 +0200 Subject: [PATCH 1/2] Added activeOpacity prop --- PhotoGrid.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PhotoGrid.js b/PhotoGrid.js index beaddbd..a77266b 100644 --- a/PhotoGrid.js +++ b/PhotoGrid.js @@ -19,6 +19,7 @@ class PhotoGrid extends PureComponent { static defaultProps = { numberImagesToShow: 0, onPressImage: () => {}, + activeOpacity: 0.7, } isLastImage = (index, secondViewImages) => { @@ -74,7 +75,7 @@ class PhotoGrid extends PureComponent { {firstViewImages.map((image, index) => ( - this.handlePressImage(event, { image })}> {secondViewImages.map((image, index) => ( - this.handlePressImage(event, { image, index }, secondViewImages)}> {this.isLastImage(index, secondViewImages) ? ( Date: Mon, 25 May 2020 13:55:55 +0200 Subject: [PATCH 2/2] Added documentation about activeOpacity prop --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 747f2fb..79a41c4 100644 --- a/readme.md +++ b/readme.md @@ -59,6 +59,7 @@ style | PropTypes.object | Container styles imageStyle | PropTypes.object | Image styles imageProps | PropTypes.object | Image props onPressImage | PropTypes.func | Callback when press image +activeOpacity | PropTypes.number | Opacity when an image is pressed # Image props Property | Description @@ -69,4 +70,4 @@ isShowActivity | Show ActivityIndicator loading placeholderStyle | Style placeholder image ## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fduyluonglc%2Freact-native-thumbnail-grid.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fduyluonglc%2Freact-native-thumbnail-grid?ref=badge_large) \ No newline at end of file +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fduyluonglc%2Freact-native-thumbnail-grid.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fduyluonglc%2Freact-native-thumbnail-grid?ref=badge_large)