31 lines
520 B
JavaScript
31 lines
520 B
JavaScript
|
import React from 'react-native';
|
||
|
|
||
|
var {
|
||
|
StyleSheet,
|
||
|
Text,
|
||
|
View,
|
||
|
} = React;
|
||
|
|
||
|
var styles = StyleSheet.create({
|
||
|
container: {
|
||
|
flex: 1,
|
||
|
justifyContent: 'center',
|
||
|
},
|
||
|
title: {
|
||
|
fontSize: 18,
|
||
|
textAlign: 'center',
|
||
|
color: '#000'
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default class NavigationTitle extends React.Component {
|
||
|
render() {
|
||
|
const title = this.props.route.title || 'Sphere';
|
||
|
return (
|
||
|
<View style={styles.container}>
|
||
|
<Text style={styles.title}>{ title }</Text>
|
||
|
</View>
|
||
|
);
|
||
|
}
|
||
|
}
|