@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
44 lines (43 loc) • 1.88 kB
JavaScript
const _excluded = ["address", "directionLink", "details"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
/**
* GenTeaserAddress module.
* @module @massds/mayflower-react/GenTeaserAddress
* @requires module:@massds/mayflower-assets/scss/03-organisms/gen-teaser
*/
import React from "react";
import PropTypes from "prop-types";
import IconMarker from "../Icon/IconMarker.mjs";
import Address from "../Address/index.mjs";
/**
* Address
*/
const GenTeaserAddress = props => {
const address = props.address,
directionLink = props.directionLink,
details = props.details,
rest = _objectWithoutPropertiesLoose(props, _excluded);
const addrProps = {
address: address,
directionLink: directionLink,
details: details
};
return /*#__PURE__*/React.createElement("div", _extends({
className: "ma__gen-teaser__infoitem"
}, rest), /*#__PURE__*/React.createElement("span", {
className: "ma__gen-teaser__infoitem-icon"
}, /*#__PURE__*/React.createElement(IconMarker, {
width: 20,
height: 20
})), /*#__PURE__*/React.createElement(Address, addrProps));
};
GenTeaserAddress.propTypes = process.env.NODE_ENV !== "production" ? {
/** A string or html formatted string of the address */
address: PropTypes.string,
/** A link to directions to the address */
directionLink: PropTypes.string,
/** Any details related to the phone number */
details: PropTypes.string
} : {};
export default GenTeaserAddress;