UNPKG

@shopgate/pwa-common

Version:

Common library for the Shopgate Connect PWA.

6 lines 536 B
import React from'react';import PropTypes from'prop-types';import buildParams from"./helpers/buildParams";/** * @param {Function} props.children The child function to call. * @param {Object} props.context The react context. * @param {Object} props.props The props to create. * @returns {JSX} */var Consume=function Consume(_ref){var children=_ref.children,Consumer=_ref.context.Consumer,props=_ref.props;return React.createElement(Consumer,null,function(value){return children(buildParams(value,props));});};export default Consume;