import React from 'react';
import { StyleSheet, Image, Text, View } from 'react-native';
export default class VendorListItem extends React.Component {
constructor(props) {
super(props);
this.content = {
title: this.props.title,
description: this.props.description,
distance: this.props.distance,
logo: this.props.image,
locationTitle: this.props.location_title,
menu: this.props.menu
}
}
render() {
let logo = {
uri: this.content.logo
};
return (
<View style={vendorListItemStyles.container}>
<Image
style={{ width: 150, height: 100 }}
source={{ uri: this.props.content.image }}
/>
<Text>{this.props.content.image}</Text>
<Text>{this.props.content.title}</Text>
<Text>{this.props.content.description}</Text>
<Text>{this.props.content.distance}</Text>
</View>
)
}
}
const vendorListItemStyles = StyleSheet.create({
container: {
flex: 1,
// backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});