import React from "react"; import { Platform, Pressable, StyleSheet } from "react-native"; import { AnimatePresence, Motion } from "@legendapp/motion"; import { BlurView } from "expo-blur"; import { Portal } from "@gorhom/portal"; import useLayoutType from "../hooks/useLayoutType"; import { Palette, Style } from "../styles"; import { defaultBlurIntensity } from "../styles/Style"; const Overlay = ({ isVisible, setIsVisible, blurIntensity = null, children, contentContainerStyle = {}, hasPortal = true, }) => { const { isNative } = useLayoutType(); const ContentContainerView = hasPortal ? Portal : React.Fragment; return ( {isVisible ? ( { console.log("overlay pressed"); setIsVisible?.(false); }} /> {children} ) : null} ); }; export default Overlay;