UNPKG

@kubb/plugin-oas

Version:
28 lines (26 loc) 1.01 kB
import { createContext } from '@kubb/react'; import { jsx } from '@kubb/react/jsx-runtime'; // src/components/Operation.tsx var OperationContext = createContext({}); function Operation({ operation, children }) { return /* @__PURE__ */ jsx(OperationContext.Provider, { value: { operation }, children }); } Operation.Context = OperationContext; var SchemaContext = createContext({ name: "unknown", tree: [] }); function Schema({ name, value, tree = [], children }) { return /* @__PURE__ */ jsx(SchemaContext.Provider, { value: { name, schema: value, tree }, children }); } Schema.Context = SchemaContext; var OasContext = createContext({}); function Oas({ oas, children, operations, generator }) { return /* @__PURE__ */ jsx(OasContext.Provider, { value: { oas, generator, operations }, children }); } Oas.Context = OasContext; Oas.Operation = Operation; Oas.Schema = Schema; export { Oas, Operation, Schema }; //# sourceMappingURL=chunk-BAU7PO7T.js.map //# sourceMappingURL=chunk-BAU7PO7T.js.map