BuyWhat/src/components/StoreList/Item.js

24 lines
522 B
JavaScript

import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
const Item = ({ name }) => {
return (
<TouchableOpacity style={{
flex: 1,
flexDirection: 'row',
paddingTop: 5,
paddingBottom: 5,
paddingLeft: 10,
paddingRight: 10
}} onPress={() => { console.log(`item press`); }}>
<View style={{
flex: 1,
flexDirection: 'column'
}}>
<Text>{name}</Text>
</View>
</TouchableOpacity>
)
}
export default Item;