UNPKG

@shopgate/engage

Version:
36 lines (35 loc) 847 B
import React from 'react'; import PropTypes from 'prop-types'; import PhoneIcon from '@shopgate/pwa-ui-shared/icons/PhoneIcon'; import { StoreDetailsLine } from "../StoreList/StoreDetailsLine"; /** * @param {Object} props The component props * @returns {JSX} */ import { jsx as _jsx } from "react/jsx-runtime"; const StoreFinderLocationHeaderPhoneNumber = ({ phone, pure }) => { if (!phone) { return null; } if (pure) { return /*#__PURE__*/_jsx("a", { href: `tel:${phone}`, children: phone }); } return /*#__PURE__*/_jsx(StoreDetailsLine, { icon: PhoneIcon, children: /*#__PURE__*/_jsx("a", { href: `tel:${phone}`, children: phone }) }); }; StoreFinderLocationHeaderPhoneNumber.defaultProps = { phone: null, pure: false }; export default StoreFinderLocationHeaderPhoneNumber;