one
Version:
One is a React framework for web, iOS, and Android apps.
19 lines (16 loc) • 593 B
JavaScript
import { Children, isValidElement } from "react";
const NAVIGATOR_CONFIG = "__oneNavigatorConfig";
function isNavigatorConfigChild(child) {
return isValidElement(child) && typeof child.type === "function" && child.type["__oneNavigatorConfig"] === true;
}
function getCustomNavigatorChildren(children) {
const custom = [];
Children.forEach(children, (child) => {
if (child != null && !isNavigatorConfigChild(child)) {
custom.push(child);
}
});
return custom;
}
export { NAVIGATOR_CONFIG, getCustomNavigatorChildren, isNavigatorConfigChild };
//# sourceMappingURL=children.mjs.map