-
Notifications
You must be signed in to change notification settings - Fork 8
/
placeholder.js
124 lines (120 loc) · 2.55 KB
/
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
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
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import { View } from 'react-native';
import { Placeholder, PlaceholderMedia, PlaceholderLine } from 'rn-placeholder';
import { plusIcon } from './assets/icons';
function placeholder() {
return (
<Placeholder>
<PlaceholderLine
width={40}
height={15}
noMargin={true}
style={{
borderRadius: 20,
backgroundColor: '#E75F5E',
marginTop: 20,
marginLeft: 20,
}}
/>
<PlaceholderLine
width={30}
height={10}
noMargin={true}
style={{
borderRadius: 20,
backgroundColor: '#E75F5E',
marginTop: 10,
marginLeft: 20,
opacity: 0.5,
}}
/>
</Placeholder>
);
}
function RectPlaceholder() {
return (
<View>
<PlaceholderMedia
// size={100}
color={'#2E4987'}
style={{
// opacity: 0.8,
borderRadius: 20,
height: '80%',
width: '100%',
// backgroundColor: 'red',
}}
/>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
marginTop: 15,
}}
>
<View
style={{
width: 140,
marginLeft: 10,
flex: 1,
}}
>
<PlaceholderLine
width={80}
height={20}
noMargin={true}
style={{
borderRadius: 20,
backgroundColor: '#6389E4',
}}
/>
<PlaceholderLine
width={50}
height={10}
noMargin={true}
style={{
borderRadius: 20,
backgroundColor: '#2E4987',
marginTop: 10,
opacity: 0.5,
}}
/>
</View>
<View
style={{
backgroundColor: '#45C8B8',
height: 40,
width: 40,
borderRadius: 50,
alignItems: 'center',
justifyContent: 'center',
}}
>
{plusIcon}
</View>
</View>
</View>
);
}
function thumbnailPlaceholder() {
return (
<PlaceholderMedia
isRound={false}
// size={70}
color={'#2E4987'}
style={{
// opacity: 0.8,
borderRadius: 10,
width: '100%',
height: '100%',
// alignSelf: 'stretch',
}}
/>
);
}
module.exports = {
placeholder,
RectPlaceholder,
thumbnailPlaceholder,
};