Skip to content

Commit 081f1d9

Browse files
committed
Address warnings for prop types
1 parent 2a12366 commit 081f1d9

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kunai-consulting/fork-react-image-lightbox",
3-
"version": "6.0.5-alpha.1",
3+
"version": "6.0.5-alpha.2",
44
"description": "A lightbox component for React.js",
55
"scripts": {
66
"build": "rollup -c",

src/react-image-lightbox.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,21 +1846,21 @@ ReactImageLightbox.propTypes = {
18461846
thumbnailImages: PropTypes.arrayOf(PropTypes.string),
18471847

18481848
// custom close button component
1849-
closeButtonComponent: PropTypes.element,
1849+
closeButtonComponent: PropTypes.func,
18501850
closeButtonComponentProps: PropTypes.shape({}),
18511851

18521852
// custom directional button component
1853-
directionalButtonComponent: PropTypes.element,
1853+
directionalButtonComponent: PropTypes.func,
18541854
directionalButtonComponentProps: PropTypes.shape({}),
18551855

18561856
// image header component
1857-
imageHeaderComponent: PropTypes.element,
1857+
imageHeaderComponent: PropTypes.func,
18581858

18591859
// offset values to set the spacing properly between main image and thumbnails
18601860
maxHeightOffset: PropTypes.number,
18611861
maxWidthOffset: PropTypes.number,
1862-
thumbnailArrowLeft: PropTypes.element,
1863-
thumbnailArrowRight: PropTypes.element,
1862+
thumbnailArrowLeft: PropTypes.func,
1863+
thumbnailArrowRight: PropTypes.func,
18641864
widthBreakPoint: PropTypes.number,
18651865
};
18661866

@@ -1903,15 +1903,15 @@ ReactImageLightbox.defaultProps = {
19031903
prevButtonImage: null,
19041904
closeButtonImage: null,
19051905
thumbnailImages: [],
1906-
closeButtonComponent: null,
1906+
closeButtonComponent: () => {},
19071907
closeButtonComponentProps: {},
1908-
directionalButtonComponent: null,
1908+
directionalButtonComponent: () => {},
19091909
directionalButtonComponentProps: {},
1910-
imageHeaderComponent: null,
1910+
imageHeaderComponent: () => {},
19111911
maxHeightOffset: 0,
19121912
maxWidthOffset: 0,
1913-
thumbnailArrowLeft: null,
1914-
thumbnailArrowRight: null,
1913+
thumbnailArrowLeft: () => {},
1914+
thumbnailArrowRight: () => {},
19151915
widthBreakPoint: 960,
19161916
};
19171917

0 commit comments

Comments
 (0)