forked from
rocksky.app/rocksky
A decentralized music tracking and discovery platform built on AT Protocol 馃幍
1import { FontAwesome5 } from "@expo/vector-icons";
2import { FC } from "react";
3import { Animated, Pressable } from "react-native";
4
5export type ScrollToTopButtonProps = {
6 bottom: number;
7 fadeAnim: Animated.Value;
8 onPress: () => void;
9};
10
11const ScrollToTopButton: FC<ScrollToTopButtonProps> = ({
12 bottom,
13 fadeAnim,
14 onPress,
15}) => (
16 <Animated.View
17 style={{
18 position: "absolute",
19 bottom,
20 left: 20,
21 opacity: fadeAnim,
22 zIndex: 1000,
23 }}
24 >
25 <Pressable
26 onPress={onPress}
27 style={{
28 borderColor: "#333",
29 borderWidth: 1,
30 borderStyle: "solid",
31 backgroundColor: "#000",
32 borderRadius: 30,
33 width: 60,
34 height: 60,
35 justifyContent: "center",
36 alignItems: "center",
37 elevation: 5,
38 }}
39 >
40 <FontAwesome5 name="chevron-up" size={20} color="white" />
41 </Pressable>
42 </Animated.View>
43);
44
45export default ScrollToTopButton;