Skip to content

Commit 3f057ce

Browse files
committed
add ImageViewer
1 parent 8dd7c6f commit 3f057ce

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/components/ImageViewer/index.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from 'react';
2+
import ImageView from 'react-native-image-viewing';
3+
4+
type Props = {
5+
images: {uri: string}[];
6+
isVisible: boolean;
7+
handleClose: () => void;
8+
imageIndex: number;
9+
};
10+
11+
const ImageViewer: React.FC<Props> = ({
12+
images,
13+
isVisible,
14+
handleClose,
15+
imageIndex,
16+
}) => {
17+
return (
18+
<ImageView
19+
images={images}
20+
imageIndex={imageIndex}
21+
visible={isVisible}
22+
onRequestClose={handleClose}
23+
/>
24+
);
25+
};
26+
27+
export default ImageViewer;

0 commit comments

Comments
 (0)