UNPKG

989 BJavaScriptView Raw
1var __rest = (this && this.__rest) || function (s, e) {
2 var t = {};
3 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4 t[p] = s[p];
5 if (s != null && typeof Object.getOwnPropertySymbols === "function")
6 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8 t[p[i]] = s[p[i]];
9 }
10 return t;
11};
12import React, { createContext } from 'react';
13import { addMissingConfig } from '../boot/addMissingConfig';
14export const ShopConfigContext = createContext(undefined);
15export function ConfigProvider(_a) {
16 var { config: userConfig, children } = _a, rest = __rest(_a, ["config", "children"]);
17 const config = addMissingConfig(userConfig);
18 return (React.createElement(ShopConfigContext.Provider, Object.assign({ value: config }, rest), children));
19}
20//# sourceMappingURL=ConfigProvider.js.map
\No newline at end of file