Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import { View, Text, Image } from 'react-native';
  3.  
  4. const HomeItem = (props) => {
  5.   return (
  6.     <View style={[styles.containerStyle, props.style]}>
  7.       <Image source={require('../assets/house.jpg')} />
  8.       <View style={styles.textContainer}>
  9.         <Text>Home</Text>
  10.       </View>
  11.     </View>
  12.   );
  13. };
  14.  
  15. const styles = {
  16.   containerStyle: {
  17.     borderWidth: 1,
  18.     backgroundColor: '#fff',
  19.     padding: 20,
  20.  
  21.   },
  22.   imageStyle: {
  23.     width: null,
  24.     height: null
  25.   },
  26.   textContainer : {
  27.     paddingHorizontal: 10,
  28.     paddingVertical: 20
  29.   }
  30. };
  31.  
  32. export { HomeItem };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement