-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCards.js
73 lines (69 loc) · 1.82 KB
/
Cards.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
67
68
69
70
71
72
73
import React from 'react'
import { View, Text, Image, ScrollView } from 'react-native'
import { Card, ListItem, Icon, Button } from 'react-native-elements'
const users = [
{
name: 'brynn',
avatar: 'https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg'
},
{
name: 'Nikhil',
avatar: 'https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg'
},
{
name: 'Apurv',
avatar: 'https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg'
},
{
name: 'Shivam',
avatar: 'https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg'
}
]
const Cards = () => {
return (
<View>
<Card title="CARD WITH DIVIDER">
{
users.map((u, i) => {
return (
<View key={i} >
<Image
// style={styles.image}
resizeMode="cover"
source={{ uri: u.avatar }}
/>
<Text >{u.name}</Text>
</View>
);
})
}
</Card>
<Card containerStyle={{padding: 0}} >
{
users.map((u, i) => {
return (
<ListItem
key={i}
roundAvatar
title={u.name}
leftAvatar={{ source: { uri: u.avatar } }}
/>
);
})
}
</Card>
<Card
title='HELLO WORLD'
image={{ uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg'}}>
<Text style={{marginBottom: 10}}>
The idea with React Native Elements is more about component structure than actual design.
</Text>
<Button
icon={<Icon name='code' color='#ffffff' />}
buttonStyle={{borderRadius: 0, marginLeft: 0, marginRight: 0, marginBottom: 0}}
title='VIEW NOW' />
</Card>
</View>
)
}
export default Cards