UNPKG

@massds/mayflower-react

Version:

React versions of Mayflower design system UI components

40 lines (39 loc) 1.7 kB
const _excluded = ["email", "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; } /** * GenTeaserEmail module. * @module @massds/mayflower-react/GenTeaserEmail * @requires module:@massds/mayflower-assets/scss/03-organisms/gen-teaser */ import React from "react"; import PropTypes from "prop-types"; import IconMail from "../Icon/IconMail.mjs"; import Email from "../Email/index.mjs"; /** * Email */ const GenTeaserEmail = props => { const email = props.email, details = props.details, rest = _objectWithoutPropertiesLoose(props, _excluded); const emailProps = { email: email, 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(IconMail, { width: 20, height: 20 })), /*#__PURE__*/React.createElement(Email, emailProps)); }; GenTeaserEmail.propTypes = process.env.NODE_ENV !== "production" ? { /** The email address. */ email: PropTypes.string.isRequired, /** Details around contacting the provided email. */ details: PropTypes.oneOfType([PropTypes.string, PropTypes.object]) } : {}; export default GenTeaserEmail;