-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.ios.js
108 lines (99 loc) · 2.58 KB
/
index.ios.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
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var Parse = require('parse').Parse;
var ParseReact = require('parse-react');
var Icon = require('FAKIconImage');
Parse.initialize("pQaxM3N7MRPr9L5vWnTP6haITXMrm3bu6w1Cnnop", "Dnbs6K9hpJnSe9HrQN7dR4DWnF9wZ4QIrxmK2E75");
var {
AppRegistry,
StyleSheet,
Text,
View,
Image,
TabBarIOS,
NavigatorIOS,
ListView
} = React;
var SMXTabBarIOS = require('SMXTabBarIOS');
var SMXTabBarItemIOS = SMXTabBarIOS.Item;
var FeaturedView = require('./JS/FeaturedView');
var CreateView = require('./JS/CreateView');
var Stylebook = React.createClass({
getInitialState: function () {
return {
selectedTab: 'featured'
}
},
render: function () {
return (
<SMXTabBarIOS>
<SMXTabBarItemIOS
iconName={'ion|star'}
title={'Featured'}
iconSize={32}
selected={this.state.selectedTab === 'featured'}
onPress={() => {
this.setState({
selectedTab: 'featured',
});
}}>
<NavigatorIOS
initialRoute={{
component: FeaturedView,
title: 'Stylebook',
passProps: { myProp: 'foo' },
}}
style={styles.fullScreen}
/>
</SMXTabBarItemIOS>
<SMXTabBarItemIOS
iconName={'ion|plus'}
title={'Create'}
iconSize={32}
selected={this.state.selectedTab === 'create'}
onPress={() => {
this.setState({
selectedTab: 'create',
});
}}>
<NavigatorIOS
initialRoute={{
component: CreateView,
title: 'Create',
passProps: { myProp: 'foo' },
}}
style={styles.fullScreen}
/>
</SMXTabBarItemIOS>
{/*<SMXTabBarItemIOS
iconName={'ion|heart'}
title={'Liked'}
iconSize={32}
selected={this.state.selectedTab === 'liked'}
onPress={() => {
this.setState({
selectedTab: 'liked',
});
}}>
<NavigatorIOS
initialRoute={{
component: FeaturedView,
title: 'Liked',
passProps: { myProp: 'foo' },
}}
style={styles.fullScreen}
/>
</SMXTabBarItemIOS>*/}
</SMXTabBarIOS>);
}
});
var styles = StyleSheet.create({
fullScreen: {
flex: 1,
}
});
AppRegistry.registerComponent('Stylebook', () => Stylebook);