This repository was archived by the owner on Aug 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdashboard-item-placeholder.js
72 lines (69 loc) · 1.99 KB
/
dashboard-item-placeholder.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
/* @flow */
import React from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import * as colors from './utils/colors';
import Card from './card';
const DashboardItemPlaceholder = props => (
<Card>
<View style={{ padding: 16 }}>
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={{ height: 24, flex: 0.4, backgroundColor: colors.grey }} />
<View style={{ flex: 0.6 }} />
</View>
<View
style={{
flex: 1,
flexDirection: 'row',
paddingTop: 16,
paddingBottom: 16,
}}
>
<View style={{ height: 36, flex: 1, backgroundColor: colors.grey }} />
</View>
<View style={{ flex: 1, flexDirection: 'row' }}>
<View style={{ height: 40, flex: 0.6, backgroundColor: colors.grey }} />
<View style={{ flex: 0.4 }} />
</View>
<View
style={{
flex: 1,
flexDirection: 'row',
paddingTop: 8,
paddingBottom: 8,
}}
>
<View style={{ height: 16, flex: 0.2, backgroundColor: colors.grey }} />
<View style={{ flex: 0.8 }} />
</View>
</View>
{props.showNumberOfOrders
? <View
style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
borderTopWidth: 1,
borderTopColor: colors.mainGrey,
padding: 16,
}}
>
<View
style={{ height: 16, flex: 0.3, backgroundColor: colors.grey }}
/>
<View style={{ flex: 0.6 }} />
<View
style={{ height: 16, flex: 0.1, backgroundColor: colors.grey }}
/>
</View>
: null}
</Card>
);
DashboardItemPlaceholder.displayName = 'DashboardItemPlaceholder';
DashboardItemPlaceholder.propTypes = {
showNumberOfOrders: PropTypes.bool,
};
DashboardItemPlaceholder.defaultProps = {
showNumberOfOrders: true,
};
export default DashboardItemPlaceholder;