Skip to content

Instantly share code, notes, and snippets.

@rbhatia46
Created December 15, 2017 14:44
Show Gist options
  • Save rbhatia46/a5cc62c274a2447a9dcd3a1497df7814 to your computer and use it in GitHub Desktop.
Save rbhatia46/a5cc62c274a2447a9dcd3a1497df7814 to your computer and use it in GitHub Desktop.
Reusable Header Component for React Native
import React from 'react';
import { View, Text } from 'react-native';
const Header = (props) => {
return (
<View style={styles.viewStyle}>
<Text style={styles.textStyle}>{props.headerText}</Text>
</View>
);
};
const styles = {
viewStyle: {
backgroundColor:#F7F7F7,
justifyContent : 'center',
alignItems:'center',
height:60,
paddingTop:15,
shadowColor:#000,
shadowOffset:{width:0, height:2},
shadowOpacity:0.2,
elevation:2,
position:'relative'
},
textStyle: {
fontSize:20
}
};
export default Header;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment