diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-01-19 14:58:49 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-01-19 14:58:49 +0100 |
commit | 3f228d0d84868e4a02aa7a62b09dde8092f2cc4c (patch) | |
tree | 8a4df9f1c6f23db36f9246844d812fac0da8640b /src/client/react/components/container | |
parent | 0bea1f5a594b8adfccb59783b0ec10b33443d2b3 (diff) |
Add helpbox
Diffstat (limited to 'src/client/react/components/container')
-rw-r--r-- | src/client/react/components/container/HelpBox.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/react/components/container/HelpBox.js b/src/client/react/components/container/HelpBox.js new file mode 100644 index 0000000..b4556a5 --- /dev/null +++ b/src/client/react/components/container/HelpBox.js @@ -0,0 +1,25 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +const HelpBox = ({ results }) => { + if (results.length > 0) { + return <div />; + } + + return ( + <div className="help-box"> + Voer hier een docentafkorting, klas, leerlingnummer of lokaalnummer in. + </div> + ); +}; + +HelpBox.propTypes = { + results: PropTypes.arrayOf(PropTypes.string).isRequired, +}; + +const mapStateToProps = state => ({ + results: state.search.results, +}); + +export default connect(mapStateToProps)(HelpBox); |