-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
executable file
·188 lines (184 loc) · 4.78 KB
/
App.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import * as React from 'react';
import { StyleSheet, Text, ScrollView, View } from 'react-native';
import { Avatar, Accessory, ListItem, Badge, Icon, withBadge, BottomSheet, Button, Divider, Header } from 'react-native-elements'
import BG from './BG'
import BGComponents from './BGComponents'
import Cards from './Cards'
import Checkboxes from './Checkboxes'
import Icons from './Icons'
import Inputs from './Inputs'
import ListItems from './ListItems'
import Ratings from './Ratings'
import SocialIcons from './SocialIcons'
export default function App() {
const BadgedIcon = withBadge(1)(Icon)
return (
<ScrollView style={styles.container}>
<Header
placement="center"
barStyle="light-content"
leftComponent={{icon: 'menu', color: '#fff'}}
// rightContainerStyle={{borderWidth: 3}}
centerComponent={{ text: 'BRAND', style: {color: '#fff'}}}
rightComponent={{ icon: 'home', color: '#fff' }}
/>
<Text>Avatars</Text>
<Avatar
rounded
source={{
uri:
'https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg',
}}
/>
<Avatar
rounded
size="large"
source={{
uri:
'https://s3.amazonaws.com/uifaces/faces/twitter/adhamdannaway/128.jpg',
}}
activeOpacity={0.5}
>
<Accessory />
</Avatar>
<ListItem
leftAvatar={{
title: 'A',
source: { uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/adhamdannaway/128.jpg'},
showAccessory: true,
}}
title='Alladin'
subtitle='CEO'
chevron
/>
<ListItem
leftAvatar={{
title: 'A',
source: { uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/adhamdannaway/128.jpg'},
showAccessory: true,
}}
title='Alladin'
subtitle='CEO'
chevron
/>
<Badge value={<Text>My Custom Badge</Text>} />
<Badge value="99+" status="error" />
<Badge status="success" />
<Badge status="primary" />
<Badge status="error" />
<Badge status="warning" />
<View>
<Avatar
rounded
source={{
uri: 'https://randomuser.me/api/portraits/men/41.jpg'
}}
size="large"
/>
<Badge status="error" containerStyle={{ position: 'absolute', top: -4, right: -4}} />
</View>
<BadgedIcon type="ionicon" name="ios-chatbubbles" />
<BottomSheet
list={[
{title: 'List Item 1'},
{title: 'List Item 2'},
{
title: 'Cancel',
containerStyle: {backgroundColor: 'red'},
titleStyle: {color: 'white'}
}
]}
cancelButtonIndex={1}
buttonProps={{title: 'Open Button Sheet'}}
/>
<BottomSheet
list={[
{
title: 'Appoinments',
leftIcon: {name: 'av-timer'}
},
{
title: 'Trips',
leftIcon: {name: 'flight-takeoff'}
},
{
title: 'Cancel',
leftIcon: {name: 'close', color: 'white'},
containerStyle: {backgroundColor: 'red'},
titleStyle: {color: 'white'},
}
]}
buttonProps={{
title: 'Open Bottom Sheet with Icons',
icon: {
name: 'chevron-down',
size: 15,
color: 'white',
type: 'entypo'
}
}}
cancelButtonIndex = {2}
/>
<Button
title="Solid Button"
/>
<Button
title="Clear Button"
type="clear"
/>
<Button
title="Solid Button"
type="outline"
/>
<Button
icon={
<Icon
name="arrow-forward"
size={15}
color="white"
/>
}
title="Button with Icon Component"
/>
<Button
icon={
<Icon
name="arrow-forward"
size={15}
color="white"
/>
}
iconRight
title="Button with right icon"
/>
<Button
title="Loading button"
loading
raised
buttonStyle={{marginVertical: 5}}
linearGradientProps={{
colors: ['red', 'pink'],
start: { x: 0, y: 0.5 },
end: { x: 1, y: 0.5 },
}}
/>
<BG />
<BGComponents />
<Cards />
<Divider style={{marginVertical: 10, backgroundColor: 'blue', height: 2, marginHorizontal: '10%'}}/>
<Checkboxes />
<Icons />
<Inputs />
<ListItems />
<Ratings />
<SocialIcons />
</ScrollView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
// borderWidth: 2,
},
});