Skip to content

Instantly share code, notes, and snippets.

@Robdel12
Created December 15, 2016 22:13
Show Gist options
  • Save Robdel12/ec058583f0cfaaed2931ca3bd97e222f to your computer and use it in GitHub Desktop.
Save Robdel12/ec058583f0cfaaed2931ca3bd97e222f to your computer and use it in GitHub Desktop.
import React, { Component } from 'react';
import {
Text,
Image,
StyleSheet
} from 'react-native';
import {
Card,
CardItem,
} from 'native-base';
export default class RobotItem extends Component {
constructor(props) {
super(props);
this.recordContent = this.props.record.content;
}
render() {
return (
{console.log(this.recordContent.title)}
{debugger}
<Card style={[styles.cardContainer, this.props.style]}>
<CardItem>
<Text>{this.recordContent.title}</Text>
</CardItem>
<CardItem>
<Image style={{resizeMode: 'cover'}} source={{uri: this.recordContent.image}} />
</CardItem>
<CardItem>
<Text>{this.recordContent.description}</Text>
</CardItem>
</Card>
);
}
}
const styles = StyleSheet.create({
cardContainer: {
margin: 10
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment