UNPKG

one

Version:

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

31 lines (23 loc) • 930 B
import { jsx } from "react/jsx-runtime"; import { isValidElement } from "react"; import { Slot } from "./Slot.native.js"; import { useTabsWithChildren } from "./Tabs.shared.native.js"; export * from "./Tabs.shared.native.js" export * from "./TabContext.native.js" export * from "./TabList.native.js" export * from "./TabSlot.native.js" export * from "./TabTrigger.native.js" function Tabs(props) { var { children, asChild, options, ...rest } = props; var Comp = asChild ? Slot : "div"; var { NavigationContent } = useTabsWithChildren({ children: asChild && /* @__PURE__ */ isValidElement(children) && children.props && typeof children.props === "object" && "children" in children.props ? children.props.children : children, ...options }); return /* @__PURE__ */ jsx(Comp, { ...rest, children: /* @__PURE__ */ jsx(NavigationContent, { children }) }); } export { Tabs }; //# sourceMappingURL=Tabs.native.js.map