Skip to content

Commit 3012135

Browse files
author
Ben Howell
authored
Merge pull request #121 from JimishF/master
Added extra Prop for Gallery, to assign any prop directly to lightbox.
2 parents 22bf730 + d2b36ba commit 3012135

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Gallery.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ class Gallery extends Component {
305305
theme={this.props.theme}
306306
onClickThumbnail={this.getOnClickLightboxThumbnailFn()}
307307
showThumbnails={this.props.showLightboxThumbnails}
308+
{...this.props.lightBoxProps}
308309
/>
309310
</div>
310311
);
@@ -367,7 +368,8 @@ Gallery.propTypes = {
367368
showLightboxThumbnails: PropTypes.bool,
368369
onClickLightboxThumbnail: PropTypes.func,
369370
tagStyle: PropTypes.object,
370-
thumbnailImageComponent: PropTypes.func
371+
thumbnailImageComponent: PropTypes.func,
372+
lightBoxProps : PropTypes.object,
371373
};
372374

373375
Gallery.defaultProps = {
@@ -386,6 +388,7 @@ Gallery.defaultProps = {
386388
showImageCount: true,
387389
lightboxWidth: 1024,
388390
showLightboxThumbnails: false,
391+
lightBoxProps : {},
389392
};
390393

391394
module.exports = Gallery;

0 commit comments

Comments
 (0)