Skip to content

Commit 1cce20e

Browse files
committed
Floating action button
1 parent c0d3d47 commit 1cce20e

4 files changed

Lines changed: 44 additions & 1 deletion

File tree

10 KB
Loading

packages/react-native-query-devtool/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"build": "tsup"
2424
},
2525
"type": "module",
26+
"dependencies": {
27+
"react-native-actions-sheet": "^0.9.3",
28+
"react-native-json-tree":"^1.3.0"
29+
},
2630
"devDependencies": {
2731
"@types/node": "^20.11.8",
2832
"@types/react": "^18.2.48",
@@ -37,6 +41,7 @@
3741
},
3842
"peerDependencies": {
3943
"react": "*",
40-
"react-native": "*"
44+
"react-native": "*",
45+
"react-native-gesture-handler": "*"
4146
}
4247
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from "react";
2+
3+
import { Image, TouchableOpacity } from "react-native";
4+
5+
import { styles } from "./styles";
6+
7+
const FloatingButton: React.FC<{ onPress: () => void }> = ({ onPress }) => {
8+
return (
9+
<TouchableOpacity
10+
activeOpacity={0.8}
11+
onPress={onPress}
12+
style={styles.container}
13+
>
14+
<Image
15+
style={styles.image}
16+
source={require("../../../assets/rqlogo.png")}
17+
/>
18+
</TouchableOpacity>
19+
);
20+
};
21+
22+
export default FloatingButton;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { StyleSheet } from "react-native";
2+
3+
export const styles = StyleSheet.create({
4+
container: {
5+
zIndex: 9999,
6+
position: "absolute",
7+
bottom: 50,
8+
left: 30,
9+
borderRadius: 100,
10+
},
11+
image: {
12+
width: 40,
13+
height: 40,
14+
objectFit: "contain",
15+
},
16+
});

0 commit comments

Comments
 (0)