Skip to content

Instantly share code, notes, and snippets.

@bharat-tiwari
Created November 22, 2019 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bharat-tiwari/22bd7f532c1a35fae8b64f572bff966f to your computer and use it in GitHub Desktop.
Save bharat-tiwari/22bd7f532c1a35fae8b64f572bff966f to your computer and use it in GitHub Desktop.
Header component
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