UNPKG

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

Version:
40 lines (38 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ModalPortal = void 0; var _reactNative = require("react-native"); var _reactNativeGestureHandler = require("react-native-gesture-handler"); var _jsxRuntime = require("react/jsx-runtime"); // TODO: this is funky with Expo // import { FullWindowOverlay } from 'react-native-screens'; function ModalPortalIos({ children, ...rest }) { return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, { transparent: true, ...rest, children: children }); } const FLEX_STYLE = { flex: 1 }; function ModalPortalAndroid({ children, ...rest }) { return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, { transparent: true, ...rest, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, { style: FLEX_STYLE, children: children }) }); } const ModalPortal = exports.ModalPortal = _reactNative.Platform.OS === "ios" ? ModalPortalIos : ModalPortalAndroid; //# sourceMappingURL=modal-portal.js.map