@shopgate/engage
Version:
Shopgate's ENGAGE library.
5 lines • 661 B
JavaScript
import*as React from'react';import PropTypes from'prop-types';import{hot}from'react-hot-loader/root';import{createPortal}from'react-dom';import PaymentBarContent from"./PaymentBarContent";/**
* The cart payment bar component.
* @param {Object} props The component props.
* @returns {JSX}
*/function PaymentBar(_ref){var visible=_ref.visible,showSeparator=_ref.showSeparator;var domElement=document.getElementById('AppFooter');if(!visible||!domElement){return null;}return createPortal(React.createElement(PaymentBarContent,{showSeparator:showSeparator}),domElement);}PaymentBar.defaultProps={visible:true,showSeparator:false};export default hot(PaymentBar);