BuyWhat/src/components/StoreList/Item.js

26 lines
557 B
JavaScript
Raw Normal View History

2017-07-04 13:14:01 +00:00
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
2017-07-04 15:08:19 +00:00
const Item = ({ name, onClick }) => {
2017-07-04 13:14:01 +00:00
return (
<TouchableOpacity style={{
flex: 1,
flexDirection: 'row',
paddingTop: 5,
paddingBottom: 5,
paddingLeft: 10,
paddingRight: 10
2017-07-04 15:08:19 +00:00
}} onPress={() => { onClick() }}>
2017-07-04 13:14:01 +00:00
<View style={{
flex: 1,
flexDirection: 'column'
}}>
2017-07-04 15:08:19 +00:00
<Text style={{
fontSize: 20
}}>{name}</Text>
2017-07-04 13:14:01 +00:00
</View>
</TouchableOpacity>
)
}
export default Item;