-
Notifications
You must be signed in to change notification settings - Fork 0
/
BarCode.js
99 lines (86 loc) · 1.91 KB
/
BarCode.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
'use strict';
var React = require('react-native');
var {
View,
Text,
StyleSheet,
NavigatorIOS,
Image,
SwitchIOS,
Component
} = React;
var styles = StyleSheet.create({
container: {
marginTop: 65,
backgroundColor:'#F1F1F1',
flex: 1,
},
passContainer:{
flex:0,
backgroundColor:'white',
borderRadius:2,
margin:10,
padding:20,
shadowColor:'grey',
shadowRadius:3,
shadowOpacity:1,
shadowOffset:{width:3,height:3},
},
passInformation:{
alignItems: 'center',
flexDirection: 'row',
padding: 10,
},
passName:{
fontSize: 16,
flex: 1,
paddingLeft: 5,
fontWeight:'bold'
},
passRiders:{
flex: 0.25,
alignItems: 'center',
},
passRideText:{
fontSize:14,
color:'grey',
fontWeight:'bold'
},
base:{
height:290,
flex:1,
},
switchContainer:{
margin:10,
padding:20,
}
});
class BarCode extends Component {
constructor(props) {
super(props);
this.state = {
trueSwitchIsOn: true,
};
}
render() {
return (
<View style={styles.container}>
<View style={styles.passContainer}>
<Image
style={styles.base}
source={{uri: 'https://chart.googleapis.com/chart?cht=qr&chl=9871116244&choe=UTF-8&chs=200x200'}}/>
<View style={styles.passInformation}>
<Text style={ styles.passName}>
Bus-10 Day Pass
</Text>
<View style={ styles.passRiders}>
<Text style={ styles.passRideText}>Rides</Text>
<Text style={ styles.passRideText}>10</Text>
</View>
</View>
</View>
</View>
);
}
}
module.exports = BarCode;