Last active
April 15, 2018 03:38
-
-
Save b-tiwari/d6134c1dddb2a7e8402ad46874ed03ac to your computer and use it in GitHub Desktop.
header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { StyleSheet, View, Text } from 'react-native'; | |
interface CompProps { | |
title: string | |
} | |
const Header = (props: CompProps) => { | |
return ( | |
<View style= { styles.container }> | |
<Text style= { styles.titleText }> {props.title} </Text> | |
</View> | |
); | |
}; | |
const styles = StyleSheet.create({ | |
container : { | |
flex: 1, | |
alignItems: 'center', | |
justifyContent: 'center', | |
backgroundColor: '#669999' | |
}, | |
titleText:{ | |
color: '#fff', | |
fontSize: 30 | |
} | |
}); | |
export default Header; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment