diff --git a/src/components/search/Form.js b/src/components/search/Form.js new file mode 100644 index 00000000..61b4aeda --- /dev/null +++ b/src/components/search/Form.js @@ -0,0 +1,62 @@ +import React from 'react' +import PropTypes from 'prop-types'; + +/** + * Search component form that can be customized with change and submit handlers + * @param {object} props + * { + * handleChange: A form input change event handler. This function is executed when the + * search input or order by input changes. + * handleSubmit: A form submit event handler. This function is executed when the + * search form is submitted. + * } + * @returns + */ +const Form = ({ handleChange, handleSubmit }) => { + + return ( +
+ ); +}; + +Form.propTypes = { + handleChange: PropTypes.func.isRequired, + handleSubmit: PropTypes.func.isRequired +} + +export default Form; diff --git a/src/components/search/Item.js b/src/components/search/Item.js new file mode 100644 index 00000000..1d47183b --- /dev/null +++ b/src/components/search/Item.js @@ -0,0 +1,55 @@ +import React from 'react' +import Link from 'next/link'; +import PropTypes from 'prop-types'; + +/** + * Single item from a search result showing info about a dataset. + * @param {object} props data package with the following format: + * { + * organization: {name: