Skip to content

Instantly share code, notes, and snippets.

@mMarcos208
Last active March 25, 2019 21:04
Show Gist options
  • Save mMarcos208/37b962aed61f49523dc2b4be299d6585 to your computer and use it in GitHub Desktop.
Save mMarcos208/37b962aed61f49523dc2b4be299d6585 to your computer and use it in GitHub Desktop.
Componente para exibir os
import React, { Component } from 'react'
import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native'
import { Card, CardItem, Body, Button } from 'native-base';
export default class DisplayCard extends Component {
render() {
return (
<View>
<TouchableOpacity onPress={() => { }}>
<Card>
<CardItem style={{ height: 280, borderRadius: 4 }}>
<Body>
<Image
style={styles.image}
resizeMode="cover"
source={{ uri: this.props.imgUrl }}
/>
<Text style={{marginBottom: 10}}>
{this.props.title}
</Text>
<View style={{position: 'absolute', bottom: 0}}>
<Button style={{borderRadius: 4, backgroundColor: '#ca0a12', width: 145, flexDirection: "row", justifyContent: "center"}}
onPress={() => {
}}>
<Text style={{color: 'white'}}>COMPRAR</Text>
</Button>
</View>
</Body>
</CardItem>
</Card>
</TouchableOpacity>
</View>
);
}
}
const styles = StyleSheet.create({
image: {
width: 150,
height: 150
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment