UNPKG

@attio/react-native-bottom-sheet-toolbox

Version:
36 lines (34 loc) 848 B
"use strict"; import { Modal, Platform } from "react-native"; import { GestureHandlerRootView } from "react-native-gesture-handler"; // TODO: this is funky with Expo // import { FullWindowOverlay } from 'react-native-screens'; import { jsx as _jsx } from "react/jsx-runtime"; function ModalPortalIos({ children, ...rest }) { return /*#__PURE__*/_jsx(Modal, { transparent: true, ...rest, children: children }); } const FLEX_STYLE = { flex: 1 }; function ModalPortalAndroid({ children, ...rest }) { return /*#__PURE__*/_jsx(Modal, { transparent: true, ...rest, children: /*#__PURE__*/_jsx(GestureHandlerRootView, { style: FLEX_STYLE, children: children }) }); } export const ModalPortal = Platform.OS === "ios" ? ModalPortalIos : ModalPortalAndroid; //# sourceMappingURL=modal-portal.js.map