"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = require("react");

var _propTypes = _interopRequireDefault(require("prop-types"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

class ConfigProvider extends _react.Component {
  getChildContext() {
    return {
      config: this.props.config
    };
  }

  render() {
    return _react.Children.only(this.props.children);
  }

}

exports.default = ConfigProvider;
ConfigProvider.propTypes = {
  children: _propTypes.default.node.isRequired,
  config: _propTypes.default.object.isRequired
};
ConfigProvider.childContextTypes = {
  config: _propTypes.default.object
};