-
Notifications
You must be signed in to change notification settings - Fork 0
/
Provider.js
66 lines (62 loc) · 1.48 KB
/
Provider.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
58
59
60
61
62
63
64
65
66
import React from 'react';
import { StyleSheet, View, Text, Image, TouchableOpacity } from 'react-native';
import {UNAVAILABLE} from './strings';
const Provider = ({
title, logo, id, status, statusDetail, onPress
}) => {
return(
<TouchableOpacity
onPress={() => onPress(id)}>
<View style={styles.container}>
<View style={styles.imageContainer}>
<Image
style={[styles.image, status ==='UNAVAILABLE' && styles.imageUnavailable]}
source={{uri: logo}}
/>
</View>
<View style={{flexDirection: 'column'}}>
<Text style={[styles.title, status ==='UNAVAILABLE' && styles.titleUnavailabe]}>{title}</Text>
{(status ==='UNAVAILABLE' &&
<Text style={styles.titleUnavailabe}>{UNAVAILABLE}</Text>
)}
</View>
</View>
</TouchableOpacity>
)
};
const styles = StyleSheet.create({
container: {
width: '100%',
flexDirection: 'row',
alignItems: 'center',
marginBottom: '2.5%',
margin: '2.5%',
marginLeft: '5%'
},
imageContainer: {
width: 60,
height: 60,
borderRadius: 30,
backgroundColor: '#F3F3F3',
justifyContent: 'center',
alignItems: 'center',
marginRight: '5%'
},
image: {
width: 40,
height: 40,
resizeMode: 'contain'
},
imageUnavailable: {
tintColor: '#CFCFCF'
},
title: {
color: '#292929',
fontFamily: 'Hermes-RegularCond',
fontSize: 14
},
titleUnavailabe:{
color: '#B8B8B8',
}
});
export default Provider;