aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/components')
-rw-r--r--src/client/react/components/presentational/Search.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/client/react/components/presentational/Search.js b/src/client/react/components/presentational/Search.js
new file mode 100644
index 0000000..0dde8a6
--- /dev/null
+++ b/src/client/react/components/presentational/Search.js
@@ -0,0 +1,24 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+const Search = ({ onInput, results }) => (
+ <div>
+ <input
+ onInput={onInput}
+ placeholder="Zoeken"
+ />
+ <ul>
+ {results.map(result => <li key={result.name}>{result.name}</li>)}
+ </ul>
+ </div>
+);
+
+Search.propTypes = {
+ onInput: PropTypes.func.isRequired,
+ results: PropTypes.arrayOf(PropTypes.shape({
+ name: PropTypes.string.require,
+ type: PropTypes.string.require,
+ })).isRequired,
+};
+
+export default Search;