-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImageViewer.js
31 lines (27 loc) · 1003 Bytes
/
ImageViewer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React, { Component } from 'react';
import { Modal, View, TouchableOpacity, Text } from 'react-native';
import ImageViewer from 'react-native-image-zoom-viewer';
class ImageViewers extends Component {
render() {
const data = this.props.data;
const images = [
{
url: data
},
]
return (
<Modal visible={this.props.visible} transparent={true}>
<View style={{ flex: 1, backgroundColor: '#000000', paddingBottom: 50 }}>
<TouchableOpacity
style={{ justifyContent: 'flex-end', marginTop: 50, marginLeft: 20 }}
onPress={this.props.close}
>
<Text style={{ color: 'white', fontSize: 20 }}>Back</Text>
</TouchableOpacity>
<ImageViewer imageUrls={images} />
</View>
</Modal>
)
}
}
export default ImageViewers;