@shopgate/engage
Version:
Shopgate's ENGAGE library.
5 lines • 923 B
JavaScript
import*as React from'react';import CartItemCardReservation from"./CartItemCardReservation";import{withBorder}from"./CartItemCard.style";/**
* Renders the cart items.
* @param {Object} props The component props.
* @returns {JSX}
*/export function CartItemCard(props){var multiLineReservation=props.multiLineReservation,fulfillmentLocationId=props.fulfillmentLocationId,children=props.children,fulfillmentMethod=props.fulfillmentMethod,hasMessages=props.hasMessages;if(!multiLineReservation){return children;}return React.createElement(React.Fragment,null,React.createElement("ul",{className:fulfillmentLocationId&&!hasMessages?withBorder:null},children),!!fulfillmentLocationId&&React.createElement(CartItemCardReservation,{locationId:fulfillmentLocationId,fulfillmentMethod:fulfillmentMethod}));}CartItemCard.defaultProps={fulfillmentLocationId:null,fulfillmentMethod:null,multiLineReservation:false,hasMessages:false};