ImageViewer component for RN
$ npm install --save react-native-image-fit
or
$ yarn add react-native-image-fit
import { ImageViewer } from 'react-native-image-fit';
export const App = () => (
<ImageViewer
disabled={false} // by default
source={require('./photo.png')} // or { url: 'https://...' }
doubleTapEnabled={true} // by default double tap will zoom image
onMove={(e, gestureState) => null}
onPress={(opening) => console.log(opening)}
mainImageStyle={styles.someStyle}
zoomedImageStyle={styles.zoomedImageStyle}
mainImageProps={{
resizeMode: 'contain'
}}
zoomedImageProps={{
resizeMode: 'contain'
}}
/>
)