Skip to content

Instantly share code, notes, and snippets.

@b-tiwari
Last active April 15, 2018 03:38
Show Gist options
  • Save b-tiwari/d6134c1dddb2a7e8402ad46874ed03ac to your computer and use it in GitHub Desktop.
Save b-tiwari/d6134c1dddb2a7e8402ad46874ed03ac to your computer and use it in GitHub Desktop.
header.tsx
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