UNPKG

@bapp/auto-api-client

Version:

Client to consume BAPP auto API, based on content types with type inference

18 lines (17 loc) 477 B
import i, { useContext as n } from "react"; import { BAPP_AUTO_API_CONFIG_CONTEXT as r } from "./context.js"; import { BappAutoApiUsageError as A } from "./errors.js"; const f = (p) => { const { children: e, ...t } = p, o = { ...n(r), ...t }; if (!o.bappAutoApi) throw new A( "BappAutoApiProvider received no bappAutoApi prop" ); return /* @__PURE__ */ i.createElement(r.Provider, { value: o }, e); }; export { f as BappAutoApiConfigProvider };