-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonboarding.js
64 lines (54 loc) · 1.45 KB
/
onboarding.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
'use strict';
var React = require("react-native");
var {
AppRegistry,
StyleSheet,
Text,
View,
Image,
Dimensions
} = React;
var {
width,
height
} = Dimensions.get("window");
var Carousel = require("./Carousel");
var styles = StyleSheet.create({
container: {
width: width,
flex: 1,
justifyContent: "center",
alignItems: "center",
backgroundColor: "transparent"
},
image: {
height: height,
width: width
}
});
var Onboarding = React.createClass({
shouldComponentUpdate: function(nextProps, nextState) {
return false;
},
render: function() {
var images = [
{uri: "http://mbh-static.s3.amazonaws.com/mycrew/new_onboarding_1.jpg?t=1"},
{uri: "http://mbh-static.s3.amazonaws.com/mycrew/new_onboarding_2.jpg?t=1"},
{uri: "http://mbh-static.s3.amazonaws.com/mycrew/new_onboarding_3.jpg?t=1"},
{uri: "http://mbh-static.s3.amazonaws.com/mycrew/new_onboarding_4.jpg?t=1"},
{uri: "http://mbh-static.s3.amazonaws.com/mycrew/new_onboarding_5.jpg?t=2"}
];
return (
<Carousel width={width} indicatorSize={30} indicatorPosition={115} inactiveIndicatorColor="#999999" indicatorColor="#444444" indicatorSpace={14}>
{images.map(function(image) {
return (
<View style={styles.container}>
<Image style={styles.image} source={image} />
</View>
);
})}
</Carousel>
);
}
});
module.exports = Onboarding;