Last active
March 25, 2019 21:04
-
-
Save mMarcos208/37b962aed61f49523dc2b4be299d6585 to your computer and use it in GitHub Desktop.
Componente para exibir os
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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