diff --git a/src/components/Input.tsx b/src/components/Input.tsx new file mode 100644 index 0000000..136a57a --- /dev/null +++ b/src/components/Input.tsx @@ -0,0 +1,58 @@ +import React, { Component }from 'react'; + +import { TextInput, View, StyleSheet } from 'react-native'; +import { BRAND_PRIMARY } from '../settings/styles'; + + +const styles = StyleSheet.create({ + inputBorder: { + borderWidth: 1, + borderColor: BRAND_PRIMARY, + borderStyle: 'solid', + borderRadius: 7, + margin: 20 + } as React.ViewStyle, + + input: { + height: 40, + fontSize: 14, + color: '#000', + textAlign: 'center', + } as React.TextStyle +}); + +interface State { + value: string +} + +export default class Input extends Component { + constructor() { + super(); + this.state = { + value: '' + }; + this.handleChange = this.handleChange.bind(this); + } + + handleChange(value : string) { + this.setState({ value }); + } + + render() { + return ( + + + + + ) + } +} diff --git a/src/index.tsx b/src/index.tsx index b62f4fc..e96d64d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5,19 +5,24 @@ import { Navigator, StyleSheet } from 'react-native'; +import './types'; + import Routes from './navigation/Routes'; import RouteMapper from './navigation/RouteMapper'; -import './types'; +import { NAVBAR_HEIGHT } from './settings/styles'; const styles = StyleSheet.create({ - wrapper: { - flex: 1 + container: { + flex: 1, } as React.ViewStyle, navbar: { flexDirection: 'row', justifyContent: 'center', - backgroundColor: '#888' + backgroundColor: '#FFF' + } as React.ViewStyle, + wrapper: { + marginTop: NAVBAR_HEIGHT } as React.ViewStyle }); @@ -26,16 +31,18 @@ export default class App extends Component { const Component = route.component; const props = route.props || {}; return ( - + + + ); } render() { return ( - + { render() { return ( + Welcome to React Native!