-
Notifications
You must be signed in to change notification settings - Fork 0
/
LedgexHome.android.js
95 lines (86 loc) · 2.58 KB
/
LedgexHome.android.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
'use strict';
var React = require('react-native');
var {
StyleSheet,
Text,
View,
TouchableHighlight,
DrawerLayoutAndroid,
Image
} = React;
var LedgexList = require('./LedgexList');
var LedgexHome = React.createClass({
getInitialState: function() {
return {
content: 'contacts'
};
},
render: function() {
var navigationView = (
<View style={{backgroundColor: '#F6F6F6'}}>
<TouchableHighlight onPress={()=>this.setState({content: 'balances'})}>
<View>
<View style={styles.row}>
<Image style={styles.thumb} source={require('./Contacts-35.png')} />
<Text style={styles.text}>
Contacts
</Text>
</View>
<View style={styles.separator} />
</View>
</TouchableHighlight>
<TouchableHighlight onPress={()=>this.setState({content: 'investors'})}>
<View>
<View style={styles.row}>
<Image style={styles.thumb} source={require('./Briefcase-35.png')} />
<Text style={styles.text}>
Investors
</Text>
</View>
<View style={styles.separator} />
</View>
</TouchableHighlight>
<TouchableHighlight onPress={()=>this.setState({content: 'balances'})}>
<View>
<View style={styles.row}>
<Image style={styles.thumb} source={require('./Open-Folder-35.png')} />
<Text style={styles.text}>
Account Balances
</Text>
</View>
<View style={styles.separator} />
</View>
</TouchableHighlight>
</View>
);
return (
<DrawerLayoutAndroid
drawerWidth={250}
drawerPosition={DrawerLayoutAndroid.positions.Left}
renderNavigationView={() => navigationView}>
<LedgexList navigator={this.props.navigator} content={this.state.content} auth_headers={this.props.auth_headers}/>
</DrawerLayoutAndroid>
);
},
});
var styles = StyleSheet.create({
row: {
flexDirection: 'row',
justifyContent: 'center',
padding: 10,
backgroundColor: '#F6F6F6',
},
separator: {
height: 1,
backgroundColor: '#CCCCCC',
},
thumb: {
width: 35,
height: 35,
padding: 10,
},
text: {
flex: 1,
},
});
module.exports = LedgexHome;