-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.ios.js
More file actions
53 lines (46 loc) · 946 Bytes
/
index.ios.js
File metadata and controls
53 lines (46 loc) · 946 Bytes
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
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
} = React;
var LinearGradient = require('./LinearGradient.js');
var GradientTest = React.createClass({
render: function() {
return (
<View style={styles.container}>
<LinearGradient
style={styles.gradient}
locations={[0, 1.0]}
colors={['#5ED2A0', '#339CB1']}
/>
<Text style={styles.text}>
Hello Gradients!
</Text>
</View>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
},
gradient: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0,
},
text: {
color: '#fff',
fontSize: 30,
backgroundColor: 'transparent',
},
});
AppRegistry.registerComponent('GradientTest', () => GradientTest);