-
Notifications
You must be signed in to change notification settings - Fork 0
/
NavigationBar.js
34 lines (31 loc) · 997 Bytes
/
NavigationBar.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
import React, { Component, PropTypes } from 'react';
import { View, Text, TouchableHighlight,Navigator, Image, TouchableOpacity } from 'react-native';
var styles = require('./styles');
var nav;
export default class NavigationBar extends Component {
_onPressButton() {
console.log("You tapped the button!");
nav.push({
page: <HomePage/> ,
index:0
});
}
render() {
if(this.props.back!==undefined){
return (
<View style={styles.navigationView}>
<TouchableOpacity style = {styles.backTouch} onPress={this.props.back}>
<Image style={styles.backBtn} source={require('./images/backArrow.png')}/>
</TouchableOpacity>
<Image style={styles.arrowTitle} source={require('./images/title.png')}/>
</View>
)
}else{
return(
<View style={styles.fullCenter}>
<Image style={styles.centerTitle} source={require('./images/title.png')}/>
</View>
)
}
}
}