UNPKG

@massds/mayflower-react

Version:

React versions of Mayflower design system UI components

33 lines (32 loc) 1.52 kB
const _excluded = ["search"]; 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; } /** * GenTeaserSearchBar module. * @module @massds/mayflower-react/GenTeaserSearchBar * @requires module:@massds/mayflower-assets/scss/03-organisms/gen-teaser */ import React from "react"; import PropTypes from "prop-types"; import TeaserSearch from "../GenTeaserSearch/index.mjs"; /** * Search bar */ const GenTeaserSearchBar = props => { const search = props.search, rest = _objectWithoutPropertiesLoose(props, _excluded); return /*#__PURE__*/React.createElement("div", _extends({ className: "ma__gen-teaser__search" }, rest), /*#__PURE__*/React.createElement(TeaserSearch, search)); }; GenTeaserSearchBar.propTypes = process.env.NODE_ENV !== "production" ? { /** search: target: target url of the search bar id: id of the search bar queryInput: query input variable to replace in the target url with the user entered term placeholder: Placeholder text of the search bar. */ search: PropTypes.shape(TeaserSearch.propTypes).isRequired } : {}; export default GenTeaserSearchBar;