more fixes and changes, crash, design …

This commit is contained in:
Thomas Demirdjian
2025-11-14 18:25:28 +01:00
parent cd31d42c0c
commit 705fda0ce3
17 changed files with 1136 additions and 785 deletions
+28 -3
View File
@@ -1,10 +1,16 @@
import React, { useCallback } from "react";
import { BlurView } from "expo-blur";
import { Pressable } from "react-native";
import { Pressable, Text } from "react-native";
import { Entypo } from "@expo/vector-icons";
import { FONT_FAMILY } from "../../styles/Fonts";
import { openShareSheet } from "../../utils/shareSheet";
export default function ShareBtn({ style, onPress = null }) {
export default function ShareBtn({
style,
onPress = null,
label = null,
iconOnly = false,
}) {
const handlePress = useCallback(() => {
if (typeof onPress === "function") {
onPress();
@@ -25,14 +31,33 @@ export default function ShareBtn({ style, onPress = null }) {
intensity={20}
tint="dark"
style={{
padding: 12,
padding: iconOnly ? 10 : label ? 10 : 12,
paddingHorizontal: iconOnly ? 10 : label ? 16 : 12,
borderRadius: 15,
overflow: "hidden",
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
borderWidth: iconOnly ? 1 : 0,
borderColor: iconOnly ? "rgba(255, 255, 255, 0.1)" : "transparent",
backgroundColor: iconOnly
? "rgba(12, 14, 18, 0.72)"
: "transparent",
}}
>
{label && !iconOnly ? (
<Text
style={{
fontSize: 14,
color: "#ffffff",
fontFamily: FONT_FAMILY.InterMedium,
marginRight: 8,
}}
numberOfLines={1}
>
{label}
</Text>
) : null}
<Entypo name="share-alternative" size={18} color="white" />
</BlurView>
</Pressable>