Created
November 22, 2019 14:22
-
-
Save bharat-tiwari/22bd7f532c1a35fae8b64f572bff966f to your computer and use it in GitHub Desktop.
Header component
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 * as 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