@shopgate/engage
Version:
Shopgate's ENGAGE library.
5 lines • 824 B
JavaScript
import React from'react';import{i18n}from'@shopgate/engage/core';import{LocationIcon}from'@shopgate/engage/components';import{BOPIS}from'@shopgate/engage/locations';import{address,addressIcon,title}from"./CartItemGroup.style";/**
* Renders the cart reservation group label.
* @param {Object} props The component props.
* @returns {JSX}
*/export function CartItemGroupReservationLabel(_ref){var location=_ref.location,fulfillmentMethod=_ref.fulfillmentMethod;if(!location){return null;}var suffix=fulfillmentMethod===BOPIS?'bopis':'ropis';return React.createElement("div",{className:address},React.createElement("div",{className:addressIcon},React.createElement(LocationIcon,null)),React.createElement("div",null,React.createElement("div",{className:title},i18n.text("locations.method.".concat(suffix))),location.name));}