share modal
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
import React from "react";
|
||||
import React, { useCallback } from "react";
|
||||
import { BlurView } from "expo-blur";
|
||||
import { Pressable } from "react-native";
|
||||
import { Entypo } from "@expo/vector-icons";
|
||||
import { openShareSheet } from "../../utils/shareSheet";
|
||||
|
||||
export default function ShareBtn({ style, onPress = null }) {
|
||||
const handlePress = useCallback(() => {
|
||||
if (typeof onPress === "function") {
|
||||
onPress();
|
||||
return;
|
||||
}
|
||||
|
||||
openShareSheet();
|
||||
}, [onPress]);
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
disabled={!onPress}
|
||||
onPress={handlePress}
|
||||
style={{
|
||||
...style,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user