UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

14 lines (11 loc) • 564 B
import { createNavigatorFactory } from "@react-navigation/core"; import { isValidElement } from "react"; import { NAVIGATOR_CONFIG } from "../headless/children.mjs"; const { Group } = createNavigatorFactory({})(); const Protected = Group; Object.assign(Protected, { [NAVIGATOR_CONFIG]: true }); function isProtectedElement(child) { return Boolean(isValidElement(child) && child.type === Group && child.props && typeof child.props === "object" && "guard" in child.props); } export { Group, Protected, isProtectedElement }; //# sourceMappingURL=Protected.mjs.map