UNPKG

@shopgate/engage

Version:
7 lines 841 B
import React from'react';import PropTypes from'prop-types';import{i18n}from"../../../core";import{openingHoursRow,openingHoursDay}from"./Store.style";/** * Renders a single opening hours line. * @param {Object} props The component props. * @param {string} props.day The day. * @param {string} props.hours The hours line. * @returns {JSX.Element} */export function StoreOpeningHoursLine(_ref){var day=_ref.day,hours=_ref.hours;if(!hours||hours===''){return null;}return React.createElement("tr",{className:openingHoursRow,"aria-label":"".concat(i18n.text("locations.".concat(day)),": ").concat(hours),tabIndex:0,role:"row"},React.createElement("td",{className:openingHoursDay,"aria-hidden":true},i18n.text("locations.".concat(day))),React.createElement("td",{"aria-hidden":true},hours));}StoreOpeningHoursLine.defaultProps={hours:null};