aboutsummaryrefslogtreecommitdiff
path: root/src/components/comments/ZoomInCropper.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/comments/ZoomInCropper.tsx')
-rw-r--r--src/components/comments/ZoomInCropper.tsx30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx
new file mode 100644
index 00000000..1620d777
--- /dev/null
+++ b/src/components/comments/ZoomInCropper.tsx
@@ -0,0 +1,30 @@
+import {RouteProp} from '@react-navigation/core';
+import {StackNavigationProp} from '@react-navigation/stack';
+import React from 'react';
+import {Image, Dimensions, Text} from 'react-native';
+import ImageZoom from 'react-native-image-pan-zoom';
+import {SCREEN_WIDTH} from '../../utils';
+import {MainStackParams} from '../../routes';
+
+type ZoomInCropperRouteProps = RouteProp<MainStackParams, 'ZoomInCropper'>;
+
+interface ZoomInCropperProps {
+ route: ZoomInCropperRouteProps;
+}
+
+export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({route}) => {
+ return (
+ <ImageZoom
+ cropWidth={Dimensions.get('window').width}
+ cropHeight={Dimensions.get('window').height}
+ imageWidth={200}
+ imageHeight={200}>
+ <Image
+ style={{width: 200, height: 200}}
+ source={{
+ uri: route.params.imageURI,
+ }}
+ />
+ </ImageZoom>
+ );
+};