@shopgate/pwa-common
Version:
Common library for the Shopgate Connect PWA.
21 lines (20 loc) • 546 B
JavaScript
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}
*/
import { jsx as _jsx } from "react/jsx-runtime";
const Consume = ({
children,
context: {
Consumer
},
props
}) => /*#__PURE__*/_jsx(Consumer, {
children: value => children(buildParams(value, props))
});
export default Consume;