forked from thrt/YueKangQRCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vaccin.js
82 lines (78 loc) · 1.69 KB
/
Vaccin.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// 疫苗接种
import React, { useEffect, useState } from 'react';
import {
Dimensions,
StyleSheet,
Text,
View,
Image,
ScrollView,
TouchableOpacity
} from 'react-native';
import moment from 'moment';
import PropTypes from 'prop-types';
const Vaccin = props => {
return (
<TouchableOpacity style={styles.all} onPress={() => {
props.onItemPress()
}}>
<View style={styles.viewTitle}>
<Image source={require('./images/item_information.jpg')} style={styles.imageImage} />
<View style={{ width: 4 }} />
<Text style={styles.textTitle}>新冠疫苗</Text>
<View style={{ width: 4 }} />
<Image
source={require('./images/item_more.png')}
style={styles.imageMore}
/>
</View>
<Text style={styles.textMessage}>
{props.message}
</Text>
<Text style={styles.textTimeOrArea}>由接种点上报</Text>
</TouchableOpacity>
);
};
Vaccin.propTypes = {
}
const styles = StyleSheet.create({
all: {
height: 144,
width: Dimensions.get('screen').width / 2 - 26,
borderRadius: 4,
backgroundColor: 'white',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'space-between',
paddingVertical: 16,
display: 'flex',
},
textTitle: {
fontSize: 18,
color: 'black',
},
viewTitle: {
flexDirection: 'row',
alignItems: 'center',
display: 'flex',
},
imageImage: {
height: 24,
width: 24,
},
imageMore: {
height: 14,
width: 14,
tintColor: 'grey'
},
textMessage: {
fontSize: 20,
fontWeight: '400',
color: 'grey'
},
textTimeOrArea: {
fontSize: 16,
color: 'grey',
},
});
export default Vaccin;