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

Commit 526b91e

Browse files
committed
updated to new version of RNElements
1 parent 75bc557 commit 526b91e

File tree

3 files changed

+56
-4
lines changed

3 files changed

+56
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lodash": "^4.15.0",
1010
"react": "15.3.1",
1111
"react-native": "0.32.0",
12-
"react-native-elements": "0.3.2",
12+
"react-native-elements": "0.4.2",
1313
"react-native-tab-navigator": "^0.3.3",
1414
"react-native-vector-icons": "^2.1.0",
1515
"react-redux": "^4.4.5",

src/about/About.js

+21-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import Icon from 'react-native-vector-icons/MaterialIcons'
66
import {
77
Text,
88
Card,
9-
SocialIcon
9+
SocialIcon,
10+
ButtonGroup
1011
} from 'react-native-elements'
1112

1213
let styles = {}
@@ -39,13 +40,32 @@ const users = [
3940
]
4041

4142
class About extends Component {
43+
constructor () {
44+
super()
45+
this.state = {
46+
selectedIndex: 0
47+
}
48+
this.updateIndex = this.updateIndex.bind(this)
49+
}
50+
updateIndex (selectedIndex) {
51+
this.setState({selectedIndex})
52+
}
4253
render () {
54+
const buttons = ['Button1', 'Button2']
55+
const { selectedIndex } = this.state
4356
return (
4457
<ScrollView style={{backgroundColor: 'white'}}>
4558
<View style={styles.headerContainer}>
4659
<Icon color='white' name='invert-colors' size={62} />
4760
<Text style={styles.heading}>Components</Text>
4861
</View>
62+
<View style={{marginTop: 20}}>
63+
<ButtonGroup
64+
textStyle={{fontSize: 13}}
65+
onPress={this.updateIndex}
66+
selectedIndex={selectedIndex}
67+
buttons={buttons} />
68+
</View>
4969
<View style={styles.container}>
5070
<Card
5171
title='CARD WITH DIVIDER'>

src/more/More.js

+34-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ let styles
66
import {
77
List,
88
ListItem,
9-
Text
9+
Text,
10+
SearchBar
1011
} from 'react-native-elements'
1112

1213
const log = () => console.log('this is an example method')
@@ -86,7 +87,38 @@ class More extends Component {
8687
<ScrollView style={styles.mainContainer}>
8788
<View style={styles.hero}>
8889
<Icon color='white' name='sentiment-very-satisfied' size={62} />
89-
<Text style={styles.heading}>List</Text>
90+
<Text style={styles.heading}>Searchbar & List</Text>
91+
</View>
92+
<View style={{marginTop: 10, marginBottom: 0}}>
93+
<SearchBar
94+
placeholder='Type Here...' />
95+
</View>
96+
<View style={{marginTop: 10, marginBottom: 0}}>
97+
<SearchBar
98+
noIcon
99+
placeholder='Type Here...' />
100+
</View>
101+
<View style={{marginTop: 10, marginBottom: 0}}>
102+
<SearchBar
103+
round
104+
placeholder='Type Here...' />
105+
</View>
106+
<View style={{marginTop: 10, marginBottom: 0}}>
107+
<SearchBar
108+
lightTheme
109+
placeholder='Type Here...' />
110+
</View>
111+
<View style={{marginTop: 10, marginBottom: 0}}>
112+
<SearchBar
113+
noIcon
114+
lightTheme
115+
placeholder='Type Here...' />
116+
</View>
117+
<View style={{marginTop: 10, marginBottom: 0}}>
118+
<SearchBar
119+
round
120+
lightTheme
121+
placeholder='Type Here...' />
90122
</View>
91123
<List>
92124
<ListView

0 commit comments

Comments
 (0)