-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApp.tsx
More file actions
77 lines (73 loc) · 1.69 KB
/
Copy pathApp.tsx
File metadata and controls
77 lines (73 loc) · 1.69 KB
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
import React from "react";
import { View, Text, StatusBar, SafeAreaView } from "react-native";
import AppleHeader from "react-native-apple-header";
// import RNAnimated from "react-native-animated-component";
import RNAnimated, {
AppearFrom,
IRNAnimatedProps,
} from "./build/dist/RNAnimated";
import RNBounceable from "@freakycoder/react-native-bounceable";
const staticData = [
"Quidditch",
"Basketball",
"Running",
"Football",
"Baseball",
"Rugby",
"Gymnastics",
"Cycling",
"Tennis",
"Golf",
"Soccer",
"Yoga",
];
const App = () => {
const renderItem = (data: any) => (
<RNBounceable
bounceEffect={0.97}
key={Math.random()}
style={{
height: 50,
width: 325,
marginTop: 12,
borderRadius: 12,
alignItems: "center",
justifyContent: "center",
backgroundColor: "#fff",
shadowRadius: 3,
shadowOpacity: 0.2,
shadowColor: "#757575",
shadowOffset: {
width: 0,
height: 3,
},
}}
>
<Text>{data}</Text>
</RNBounceable>
);
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView
style={{
flex: 1,
}}
>
<AppleHeader
imageSource={{
uri: "https://images.unsplash.com/photo-1551292831-023188e78222?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80",
}}
/>
<RNAnimated
appearFrom="bottom"
animationDuration={1300}
style={{ alignItems: "center" }}
>
{staticData.map((item) => renderItem(item))}
</RNAnimated>
</SafeAreaView>
</>
);
};
export default App;