one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 1.02 kB
Source Map (JSON)
{"version":3,"file":"children.js","names":[],"sources":["esm/headless/children.js"],"sourcesContent":["import { Children, isValidElement } from \"react\";\nconst NAVIGATOR_CONFIG = \"__oneNavigatorConfig\";\nfunction isNavigatorConfigChild(child) {\n return isValidElement(child) && typeof child.type === \"function\" && child.type[NAVIGATOR_CONFIG] === true;\n}\nfunction getCustomNavigatorChildren(children) {\n const custom = [];\n Children.forEach(children, (child) => {\n if (child != null && !isNavigatorConfigChild(child)) {\n custom.push(child);\n }\n });\n return custom;\n}\nexport {\n NAVIGATOR_CONFIG,\n getCustomNavigatorChildren,\n isNavigatorConfigChild\n};\n//# sourceMappingURL=children.js.map\n"],"mappings":";;;AACA,MAAM,mBAAmB;AACzB,SAAS,uBAAuB,OAAO;CACrC,OAAO,eAAe,KAAK,KAAK,OAAO,MAAM,SAAS,cAAc,MAAM,iCAA2B;AACvG;AACA,SAAS,2BAA2B,UAAU;CAC5C,MAAM,SAAS,CAAC;CAChB,SAAS,QAAQ,WAAW,UAAU;EACpC,IAAI,SAAS,QAAQ,CAAC,uBAAuB,KAAK,GAAG;GACnD,OAAO,KAAK,KAAK;EACnB;CACF,CAAC;CACD,OAAO;AACT"}