-
Notifications
You must be signed in to change notification settings - Fork 0
/
DetailView.js
57 lines (50 loc) · 1.09 KB
/
DetailView.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React, {Component} from 'react';
import {StyleSheet, Image, View, Text} from 'react-native';
var styles = StyleSheet.create({
container: {
marginTop: 65
},
heading: {
backgroundColor: '#F8F8F8'
},
separator: {
height: 1,
backgroundColor: '#DDDDDD'
},
image: {
width: 400,
height: 300
},
price: {
fontSize: 25,
fontWeight: 'bold',
margin: 5,
color: '#48BBEC'
},
title: {
fontSize: 20,
margin: 5,
color: '#656565'
},
description: {
fontSize: 18,
margin: 5,
color: '#656565'
}
})
export default class DetailView extends Component {
render () {
var detail = this.props.detail;
return (
<View style={styles.container}>
<Image style={styles.image} source={{uri: detail.image_url}} />
<View style={styles.heading}>
<Text style={styles.price}>£10000</Text>
<Text style={styles.title}>{detail.title}</Text>
<View style={styles.separator}/>
</View>
<Text style={styles.description}>{detail.content}</Text>
</View>
)
}
}