diff --git a/types/react-router-native/react-router-native-tests.tsx b/types/react-router-native/react-router-native-tests.tsx index 9126858216..40cd5b8532 100644 --- a/types/react-router-native/react-router-native-tests.tsx +++ b/types/react-router-native/react-router-native-tests.tsx @@ -1,15 +1,80 @@ import * as React from 'react'; -import {View} from 'react-native'; -import {NativeRouter as Router} from 'react-router-native'; +import {StyleSheet, Text, View} from 'react-native'; +import {NativeRouter as Router, Route, Link} from 'react-router-native'; + +const Home: React.SFC<{}> = () => { + return ( + + + Welcome to React Native! + + + Press Cmd+R to reload,{'\n'} + Cmd+D or shake for dev menu + + + ); +}; + +const About: React.SFC<{}> = () => { + return ( + + About + + ); +}; export default class App extends React.Component<{}, {}> { render() { return ( - - Welcome! + + + + Home + + + About + + + + ); } } + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#F5FCFF', + }, + header: { + fontSize: 20 + }, + nav: { + flexDirection: 'row', + justifyContent: 'space-around' + }, + navItem: { + flex: 1, + alignItems: 'center', + padding: 10 + }, + subNavItem: { + padding: 5 + }, + welcome: { + fontSize: 20, + textAlign: 'center', + margin: 10, + }, + instructions: { + textAlign: 'center', + color: '#333333', + marginBottom: 5, + }, +});