-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidebar.js
More file actions
50 lines (48 loc) · 1.36 KB
/
Copy pathSidebar.js
File metadata and controls
50 lines (48 loc) · 1.36 KB
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
import React from "react";
import { AppRegistry, Image, StatusBar } from "react-native";
import { Container, Content, Text, List, ListItem } from "native-base";
const routes = ["details", "home", "news"];
export default class Sidebar extends react.Component {
render() {
return (
<Container>
<Content>
<Image
source={{
uri:
"https://github.com/GeekyAnts/NativeBase-KitchenSink/raw/react-navigation/img/drawer-cover.png",
}}
style={{
height: 120,
alignSelf: "stretch",
justifyContent: "center",
alignItems: "center",
}}
>
<Image
square
style={{ height: 80, width: 70 }}
source={{
uri:
"https://github.com/GeekyAnts/NativeBase-KitchenSink/raw/react-navigation/img/logo.png",
}}
/>
</Image>
<List
dataArray={routes}
renderRow={(data) => {
return (
<ListItem
button
onPress={() => this.props.navigation.navigate(data)}
>
<Text>{data}</Text>
</ListItem>
);
}}
/>
</Content>
</Container>
);
}
}