Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import {
View,
Modal,
Image,
TouchableOpacity,
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { connectStyle } from '@shoutem/theme';
import { makeZoomable } from '@shoutem/animation';
const ZoomableImage = makeZoomable(Image);
const propTypes = {
width: PropTypes.number,
height: PropTypes.number,
source: Image.propTypes.source,
style: PropTypes.object,
};
const CLOSE_ICON_NAME = 'clear';
const CLOSE_ICON_SIZE = 25;
/**
* Renders an ImagePreview which shows an inline image preview.
* When clicked, the image is displayed in full screen.
*/
class ImagePreview extends PureComponent {