Created
October 16, 2017 23:37
-
-
Save ecavalcanti/04214f460eb842409990dccf0f425533 to your computer and use it in GitHub Desktop.
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 { ScrollView, Image, Dimensions, Text } from 'react-native' | |
const SCREEN_WIDTH = Dimensions.get('screen').width | |
export default class Description extends Component { | |
static navigationOptions = { | |
title: 'Description' | |
} | |
render() { | |
const { hero } = this.props.navigation.state.params | |
return ( | |
<ScrollView> | |
<Image | |
source={{uri: `${hero.thumbnail.path}.${hero.thumbnail.extension}`}} | |
style={{width:SCREEN_WIDTH, height:SCREEN_WIDTH}} | |
/> | |
<Text style={{padding:10, fontSize:20}}>{hero.name}</Text> | |
<Text style={{padding:10}}>{hero.description}</Text> | |
</ScrollView> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment