mirror of
https://github.com/expo/ex-navigation.git
synced 2026-11-15 13:18:15 -10:00
46 lines
1011 B
JavaScript
46 lines
1011 B
JavaScript
import React, { Component } from 'react';
|
|
import { View, Text, StyleSheet, StatusBar } from 'react-native';
|
|
import pak from '@expo/ex-navigation/package.json';
|
|
|
|
export default class HomeScreen extends Component {
|
|
/**
|
|
* This is where we can define any route configuration for this
|
|
* screen. For example, in addition to the navigationBar title we
|
|
* could add backgroundColor.
|
|
*/
|
|
static route = {
|
|
navigationBar: {
|
|
title: 'About',
|
|
tintColor: '#000',
|
|
},
|
|
};
|
|
|
|
render() {
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={styles.title}>ExNavigation</Text>
|
|
<Text style={styles.version}>{pak.version}</Text>
|
|
|
|
<StatusBar barStyle="default" />
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
backgroundColor: '#fafafa',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
},
|
|
title: {
|
|
fontWeight: 'bold',
|
|
fontSize: 32,
|
|
margin: 8,
|
|
},
|
|
version: {
|
|
fontSize: 18,
|
|
},
|
|
});
|