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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
import * as React from 'react';
import { View, Text, StyleSheet, Image } from 'react-native';
// import * as MediaLibrary from "expo-media-library";
const MARGIN = 3;
export default class PhotoSmall extends React.Component {
constructor(props) {
super(props)
this.state = {}
}
async componentDidMount() {
}
render() {
return (
<View style={styles.cont}>
<Image source={this.props.source} style={[this.props.style, styles.img, { width: this.props.size.width - MARGIN * 2, height: this.props.size.height }]} />
<Text style={[this.props.style, styles.txt]}>{this.props.id}</Text>
<Text style={[{ opacity: this.props.style.opacity === 1 ? 0 : 1 }, styles.plus]}>+</Text>
</View>
)
}
}
const styles = StyleSheet.create({
cont: {
flex: 1,
flexDirection: "column",
margin: MARGIN,
justifyContent: "center",
alignItems: "center",
},
img: {
borderRadius: 15,
flex: 1,
},
txt: {
position: "absolute",
bottom: 10,
right: 10,
color: "white",
fontWeight: "bold",
},
plus: {
position: "absolute",
alignSelf: "center",
fontWeight: "100",
fontSize: 100,
color: "#EB1F63",
},
})
|