-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomRow.js
52 lines (49 loc) · 1.09 KB
/
CustomRow.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
import React from 'react';
import {View, Text, StyleSheet, Image} from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'row',
padding: 10,
marginLeft: 16,
marginRight: 16,
marginTop: 8,
marginBottom: 8,
borderRadius: 5,
backgroundColor: '#FFF',
elevation: 2,
},
title: {
fontSize: 16,
color: '#000',
},
container_text: {
flex: 1,
flexDirection: 'column',
marginLeft: 12,
justifyContent: 'center',
},
description: {
fontSize: 11,
fontStyle: 'italic',
},
position: {
fontSize: 12,
fontStyle: 'italic',
},
photo: {
height: 50,
width: 50,
},
});
const CustomRow = ({title, description, position, image_url}) => (
<View style={styles.container}>
<Image source={{uri: image_url}} style={styles.photo} />
<View style={styles.container_text}>
<Text style={styles.title}>{title}</Text>
<Text style={styles.position}>{position}</Text>
<Text style={styles.description}>{description}</Text>
</View>
</View>
);
export default CustomRow;