Skip to content

Instantly share code, notes, and snippets.

@ecavalcanti
Created October 16, 2017 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecavalcanti/04214f460eb842409990dccf0f425533 to your computer and use it in GitHub Desktop.
Save ecavalcanti/04214f460eb842409990dccf0f425533 to your computer and use it in GitHub Desktop.
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