-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
81 lines (78 loc) · 2.36 KB
/
App.tsx
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
import React from 'react';
import { SafeAreaView, StyleSheet, Text, View } from 'react-native';
import { ShimmeringPlaceholder } from 'react-native-shimmer-animation';
const styles = StyleSheet.create({
container: {
flex: 1,
marginHorizontal: 16,
marginTop: 40,
backgroundColor: 'white',
},
title: {
fontSize: 20,
marginBottom: 12,
fontWeight: '600',
textAlign: 'center',
color: 'black',
},
sessionTitle: {
fontSize: 16,
marginTop: 20,
marginBottom: 6,
fontWeight: '600',
color: 'black',
},
});
export default function App() {
return (
<SafeAreaView style={styles.container}>
<Text style={styles.title}> React Native Reanimated Shimmer </Text>
<Text style={styles.sessionTitle}>Simple</Text>
<ShimmeringPlaceholder
style={{ borderRadius: 16 }}
size={{ width: 200, height: 15 }}
/>
<Text style={styles.sessionTitle}>Avatar</Text>
<ShimmeringPlaceholder
style={{ borderRadius: 100 }}
size={{ width: 200, height: 200 }}
/>
<Text style={styles.sessionTitle}>Facebook</Text>
<ShimmeringPlaceholder
size={{ width: 200, height: 15 }}
style={{ borderRadius: 8, marginBottom: 16, height: 24 }}
input={[-1, -0.33, 0.33, 1]}
output={[-200, 0, 200, 200]}
/>
<View style={{ height: 100 }} />
<View style={{ flexDirection: 'row' }}>
<ShimmeringPlaceholder
size={{ width: 124, height: 124 }}
style={{ borderRadius: 64, marginEnd: 16 }}
input={[-1, -0.33, 0.33, 1]}
output={[-200, 0, 200, 200]}
/>
<View style={{ justifyContent: 'space-between' }}>
<ShimmeringPlaceholder
size={{ width: 200, height: 15 }}
style={{ borderRadius: 8 }}
input={[-1, -0.33, 0.33, 1]}
output={[-200, -200, 0, 200]}
/>
<ShimmeringPlaceholder
size={{ width: 200, height: 15 }}
style={{ borderRadius: 8 }}
input={[-1, -0.33, 0.33, 1]}
output={[-200, -200, 0, 200]}
/>
<ShimmeringPlaceholder
size={{ width: 200, height: 15 }}
style={{ borderRadius: 8 }}
input={[-1, -0.33, 0.33, 1]}
output={[-200, -200, 0, 200]}
/>
</View>
</View>
</SafeAreaView>
);
}