-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHabilities.js
84 lines (75 loc) · 1.69 KB
/
Habilities.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
var React = require('react-native');
var REQUEST_IMAGE_SPELL = 'http://ddragon.leagueoflegends.com/cdn/'+ global.Config.api.vercion +'/img/spell/'
var {
View,
Text,
Image,
StyleSheet,
} = React;
var Habilities = React.createClass({
render: function() {
var urlImage = REQUEST_IMAGE_SPELL + this.props.spell.image.full;
return (
<View style={styles.wrapperContainer}>
<View style={styles.container}>
<Image
style={styles.image}
source={{uri: urlImage}}
/>
<View style={styles.rightContainer}>
<Text style={styles.name}>{this.props.spell.name}</Text>
<Text style={styles.cost}>
{this.props.spell.costType}: {this.props.spell.costBurn}
</Text>
</View>
</View>
<View style={styles.description}>
<Text style={styles.textDescription}> {this.props.spell.description}</Text>
</View>
</View>
);
},
});
var styles = StyleSheet.create({
container: {
flexDirection: 'row',
backgroundColor: '#F5FCFF',
margin: 4,
},
wrapperContainer: {
borderWidth: 1.5,
borderColor: '#424242',
},
name: {
fontSize: 18,
paddingLeft: 8,
color: 'white',
},
cost: {
fontSize: 12,
color: 'white',
paddingLeft: 8,
paddingTop: 4,
fontStyle: 'italic',
},
description: {
flex: 1,
paddingLeft: 4,
paddingBottom: 4,
},
textDescription: {
fontSize: 12,
color: 'white',
},
rightContainer: {
flex: 1,
backgroundColor: 'black',
},
image: {
width: 44,
height: 44,
borderWidth: 2,
borderColor: '#BDBDBD',
},
});
module.exports = Habilities;