Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit 329fe75

Browse files
committed
upgraded version of RN Elements
1 parent a260fac commit 329fe75

File tree

4 files changed

+33
-17
lines changed

4 files changed

+33
-17
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "HackathonStarter",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"private": true,
55
"scripts": {
66
"start": "node node_modules/react-native/local-cli/cli.js start"
@@ -9,8 +9,7 @@
99
"lodash": "^4.15.0",
1010
"react": "15.3.1",
1111
"react-native": "0.32.0",
12-
"react-native-elements": "0.4.2",
13-
"react-native-tab-navigator": "^0.3.3",
12+
"react-native-elements": "0.5.2",
1413
"react-native-vector-icons": "^2.1.0",
1514
"react-redux": "^4.4.5",
1615
"redux": "^3.5.2"

src/App.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Component } from 'react'
22
import { StyleSheet, Platform } from 'react-native'
3-
import TabNavigator from 'react-native-tab-navigator'
43
import Icon from 'react-native-vector-icons/MaterialIcons'
54
import colors from 'HSColors'
65
import fonts from 'HSFonts'
@@ -11,6 +10,8 @@ import Contact from './contact/ContactRootContainer'
1110
import Pricing from './pricing/PricingRootContainer'
1211
import More from './more/MoreRootContainer'
1312

13+
import { Tabs, Tab } from 'react-native-elements'
14+
1415
let styles = {}
1516

1617
class App extends Component {
@@ -30,8 +31,8 @@ class App extends Component {
3031
const { toggleSideMenu } = this.props
3132
const { selectedTab } = this.state
3233
return (
33-
<TabNavigator>
34-
<TabNavigator.Item
34+
<Tabs hidesTabTouch>
35+
<Tab
3536
titleStyle={[styles.titleStyle]}
3637
selectedTitleStyle={[styles.titleSelected, {marginTop: -3, marginBottom: 7}]}
3738
selected={selectedTab === 'home'}
@@ -40,8 +41,8 @@ class App extends Component {
4041
renderSelectedIcon={() => <Icon color={colors.primary} name='whatshot' size={26} />}
4142
onPress={() => this.changeTab('home')}>
4243
<Home toggleSideMenu={toggleSideMenu} />
43-
</TabNavigator.Item>
44-
<TabNavigator.Item
44+
</Tab>
45+
<Tab
4546
tabStyle={selectedTab !== 'about' && { marginBottom: -6 }}
4647
titleStyle={[styles.titleStyle, {marginTop: -1}]}
4748
selectedTitleStyle={[styles.titleSelected, {marginTop: -3, marginBottom: 7}]}
@@ -51,8 +52,8 @@ class App extends Component {
5152
renderSelectedIcon={() => <Icon color={colors.primary} name='important-devices' size={26} />}
5253
onPress={() => this.changeTab('about')}>
5354
<About />
54-
</TabNavigator.Item>
55-
<TabNavigator.Item
55+
</Tab>
56+
<Tab
5657
tabStyle={selectedTab !== 'contact' && { marginBottom: -6 }}
5758
titleStyle={[styles.titleStyle, {marginTop: -1}]}
5859
selectedTitleStyle={[styles.titleSelected, {marginTop: -3, marginBottom: 7}]}
@@ -62,8 +63,8 @@ class App extends Component {
6263
renderSelectedIcon={() => <Icon color={colors.primary} name='contacts' size={26} />}
6364
onPress={() => this.changeTab('contact')}>
6465
<Contact />
65-
</TabNavigator.Item>
66-
<TabNavigator.Item
66+
</Tab>
67+
<Tab
6768
tabStyle={selectedTab !== 'pricing' && { marginBottom: -6 }}
6869
titleStyle={[styles.titleStyle, {marginTop: -1}]}
6970
selectedTitleStyle={[styles.titleSelected, {marginTop: -3, marginBottom: 7}]}
@@ -73,8 +74,8 @@ class App extends Component {
7374
renderSelectedIcon={() => <Icon color={colors.primary} name='attach-money' size={26} />}
7475
onPress={() => this.changeTab('pricing')}>
7576
<Pricing />
76-
</TabNavigator.Item>
77-
<TabNavigator.Item
77+
</Tab>
78+
<Tab
7879
tabStyle={selectedTab !== 'more' && { marginBottom: -6 }}
7980
titleStyle={[styles.titleStyle, {marginTop: -1}]}
8081
selectedTitleStyle={[styles.titleSelected, {marginTop: -3, marginBottom: 8}]}
@@ -84,8 +85,8 @@ class App extends Component {
8485
renderSelectedIcon={() => <Icon color={colors.primary} name='list' size={26} />}
8586
onPress={() => this.changeTab('more')}>
8687
<More />
87-
</TabNavigator.Item>
88-
</TabNavigator>
88+
</Tab>
89+
</Tabs>
8990

9091
)
9192
}

src/about/About.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ class About extends Component {
183183
<SocialIcon
184184
title='Sign In With Facebook'
185185
button
186+
fontWeight='400'
186187
type='facebook'
187188
/>
188189
<SocialIcon

src/home/Home.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,98 +33,113 @@ class Home extends Component {
3333
title='SMALL BUTTON'
3434
buttonStyle={styles.button} />
3535
<Button
36+
buttonStyle={styles.button}
3637
small
3738
backgroundColor={socialColors.stumbleupon}
3839
icon={{name: 'accessibility'}}
3940
onPress={() => toggleSideMenu()}
4041
title='TOGGLE SIDE MENU'/>
4142
<Button
43+
buttonStyle={styles.button}
4244
iconRight
4345
small
4446
backgroundColor={socialColors.quora}
4547
icon={{name: 'invert-colors'}}
4648
onPress={() => log()}
4749
title='SMALL WITH RIGHT ICON'/>
4850
<Button
51+
buttonStyle={styles.button}
4952
iconRight
5053
small
5154
backgroundColor={socialColors.tumblr}
5255
icon={{name: 'motorcycle'}}
5356
onPress={() => log()}
5457
title='SMALL WITH RIGHT ICON'/>
5558
<Button
59+
buttonStyle={styles.button}
5660
raised
5761
small
5862
backgroundColor={socialColors.foursquare}
5963
icon={{name: 'card-travel'}}
6064
onPress={() => log()}
6165
title='SMALL BUTTON RAISED'/>
6266
<Button
67+
buttonStyle={styles.button}
6368
raised
6469
small
6570
backgroundColor={socialColors.vimeo}
6671
icon={{name: 'touch-app'}}
6772
onPress={() => log()}
6873
title='SMALL BUTTON RAISED'/>
6974
<Button
75+
buttonStyle={styles.button}
7076
raised
7177
small
7278
backgroundColor={socialColors.twitter}
7379
icon={{name: 'new-releases'}}
7480
onPress={() => log()}
7581
title='SMALL BUTTON RAISED'/>
7682
<Button
83+
buttonStyle={styles.button}
7784
raised
7885
small
7986
backgroundColor={socialColors.linkedin}
8087
icon={{name: 'business'}}
8188
onPress={() => log()}
8289
title='SMALL BUTTON RAISED'/>
8390
<Button
91+
buttonStyle={styles.button}
8492
raised
8593
small
8694
backgroundColor={socialColors.pinterest}
8795
icon={{name: 'send'}}
8896
onPress={() => log()}
8997
title='SMALL BUTTON RAISED'/>
9098
<Button
99+
buttonStyle={styles.button}
91100
raised
92101
small
93102
onPress={() => log()}
94103
title='SMALL BUTTON RAISED'/>
95104

96105
<Button
106+
buttonStyle={styles.button}
97107
onPress={() => log()}
98108
backgroundColor={socialColors.facebook}
99109
title='BUTTON' />
100110
<Button
111+
buttonStyle={styles.button}
101112
backgroundColor={socialColors.stumbleupon}
102113
icon={{name: 'cached'}}
103114
title='BUTTON WITH ICON' />
104115
<Button
116+
buttonStyle={styles.button}
105117
backgroundColor={socialColors.quora}
106118
raised
107119
icon={{name: 'album'}}
108120
title='RAISED WITH ICON' />
109121
<Button
122+
buttonStyle={styles.button}
110123
raised
111124
iconRight
112125
backgroundColor={socialColors.tumblr}
113126
icon={{name: 'accessibility'}}
114127
title='RAISED RIGHT ICON' />
115128
<Button
129+
buttonStyle={styles.button}
116130
raised
117131
iconRight
118132
backgroundColor={socialColors.foursquare}
119133
icon={{name: 'account-balance'}}
120134
title='RAISED RIGHT ICON' />
121135
<Button
136+
buttonStyle={styles.button}
122137
raised
123138
backgroundColor={socialColors.vimeo}
124139
icon={{name: 'change-history'}}
125140
title='RAISED WITH ICON' />
126141
<Button
127-
buttonStyle={[{marginBottom: 15}]}
142+
buttonStyle={[{marginBottom: 15, marginTop: 15}]}
128143
icon={{name: 'code'}}
129144
backgroundColor={socialColors.twitter}
130145
title='ANOTHER BUTTON' />

0 commit comments

Comments
 (0)