UNPKG

@shopgate/engage

Version:
4 lines 1.3 kB
import React from'react';import{Accordion}from'@shopgate/engage/components';import{StoreAddress,StoreOpeningHours}from'@shopgate/engage/locations';import{CartItemCardReservationLabel}from"./CartItemCardReservationLabel";import{accordionToggle,accordionContent,locationAddress,locationHours}from"./CartItemCard.style";/** * @param {Object} props The component props. * @returns {JSX} */var CartItemCardReservationAccordion=function CartItemCardReservationAccordion(_ref){var openWithChevron=_ref.openWithChevron,location=_ref.location,fulfillmentMethod=_ref.fulfillmentMethod,operationHours=_ref.operationHours;return React.createElement(Accordion,{className:accordionToggle,openWithChevron:openWithChevron,renderLabel:function renderLabel(){return React.createElement(CartItemCardReservationLabel,{location:location,fulfillmentMethod:fulfillmentMethod});}},React.createElement("div",{className:accordionContent},React.createElement("div",{className:locationAddress},React.createElement(StoreAddress,{address:location.address,pure:true})),operationHours&&React.createElement("div",{className:locationHours},React.createElement(StoreOpeningHours,{hours:operationHours,pure:true}))));};CartItemCardReservationAccordion.defaultProps={openWithChevron:false};export{CartItemCardReservationAccordion};