-
Notifications
You must be signed in to change notification settings - Fork 1
/
Menu.js
93 lines (80 loc) · 1.89 KB
/
Menu.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
var React = require('react-native');
var AllChampions = require('./AllChampions.js')
var SearchSummoner = require('./SearchSummoner.js')
var {
View,
Text,
TouchableHighlight,
StyleSheet,
} = React;
var Menu = React.createClass({
onSelectChampions: function() {
this.props.navigator.push({
title: 'All Champions',
component: AllChampions,
});
},
onSelectSummoner: function() {
// TODO Aqui va la llamada a la funcion de inicio de busqueda
// de datos de summoner
this.props.navigator.push({
title: 'Summoner',
component: SearchSummoner,
});
},
render: function() {
return (
<View style={styles.body}>
<View style={styles.main}>
<TouchableHighlight style={styles.container} onPress={this.onSelectChampions}>
<Text style={styles.name}>Champion</Text>
</TouchableHighlight>
<TouchableHighlight style={styles.containerBottom} onPress={this.onSelectSummoner}>
<Text style={styles.name}>Summoner</Text>
</TouchableHighlight>
</View>
</View>
);
},
});
var styles = StyleSheet.create({
body:{
backgroundColor:'#000000',
height: 800,
},
main:{
marginTop: 120,
},
container: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#051980',
marginTop: 20,
borderWidth: 1,
borderColor: '#0C33F4',
margin: 5,
borderRadius: 12,
height: 200,
},
containerBottom: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#051980',
marginTop: 5,
margin: 5,
borderWidth: 1,
borderColor: '#0C33F4',
borderRadius: 12,
height: 200,
},
name: {
fontSize: 20,
marginBottom: 8,
textAlign: 'center',
color:'white',
fontSize: 36,
},
});
module.exports = Menu;