UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

29 lines (28 loc) 1.11 kB
import React from "react"; import { Protected } from "../views/Protected.mjs"; import { Screen } from "../views/Screen.mjs"; import { withLayoutContext } from "./withLayoutContext.mjs"; let NativeBottomTabNavigator = null; try { const mod = require("@bottom-tabs/react-navigation"); NativeBottomTabNavigator = mod.createNativeBottomTabNavigator().Navigator; } catch {} const missingNativeTabsMessage = "NativeTabs requires @bottom-tabs/react-navigation and react-native-bottom-tabs.\nInstall: npx expo install @bottom-tabs/react-navigation react-native-bottom-tabs"; const MissingNativeTabs = React.forwardRef(function MissingNativeTabs2() { throw new Error(missingNativeTabsMessage); }); function createNativeTabs() { if (!NativeBottomTabNavigator) { return Object.assign(MissingNativeTabs, { Protected, Screen }); } return Object.assign(withLayoutContext(NativeBottomTabNavigator), { Protected }); } const NativeTabs = createNativeTabs(); var NativeTabs_default = NativeTabs; export { NativeTabs, NativeTabs_default as default }; //# sourceMappingURL=NativeTabs.mjs.map