react-native-multiple-modals
Version:
Native implementation with the ability to display multiple Modals
31 lines (29 loc) • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GestureHandlerRootView = void 0;
// The library is connected if it is detected at runtime.
// By default, gestures do not work inside a modal window.
const importGestureHandlerRootView = () => {
const Errors = {
GestureHandlerRootViewNotFound: new Error('GestureHandlerRootView not found. Please report the issue: https://github.com/paufau/react-native-multiple-modals/issues')
};
try {
const GestureHandlerRootViewComponent = require('react-native-gesture-handler').GestureHandlerRootView;
if (!GestureHandlerRootViewComponent) {
throw Errors.GestureHandlerRootViewNotFound;
}
return GestureHandlerRootViewComponent;
} catch (e) {
if (e === Errors.GestureHandlerRootViewNotFound) {
console.error(e);
}
// Fallback component used if the library is not found
return ({
children
}) => children;
}
};
const GestureHandlerRootView = exports.GestureHandlerRootView = importGestureHandlerRootView();
//# sourceMappingURL=GestureHandlerRootView.js.map