import { Motion } from "@legendapp/motion"; import React, { createContext, useRef, useState } from "react"; import { TouchableOpacity, View } from "react-native"; import { Palette } from "../styles"; import { mainBorderRadius } from "../styles/Style"; export const BottomSheetContext = createContext(); export default ({ children }) => { const [showSheet, setShowSheet] = useState(false); const [sheetContent, setSheetContent] = useState(null); const bottomSheetRef = useRef(); return ( {children} {showSheet && ( setShowSheet(false)} ref={bottomSheetRef} style={{ position: "absolute", right: 0, top: 0, left: 0, bottom: 0, flex: 1, backgroundColor: "rgba(0,0,0,0.4)", }} /> {sheetContent} )} ); };