From 2216d1ceed02e54620f16fb826e5947b6c2cb9bf Mon Sep 17 00:00:00 2001
From: Noah Loomans <noahloomans@gmail.com>
Date: Mon, 11 Dec 2017 20:43:07 +0100
Subject: Add line between results and search

---
 src/client/react/components/container/Results.jsx | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

(limited to 'src/client/react/components/container/Results.jsx')

diff --git a/src/client/react/components/container/Results.jsx b/src/client/react/components/container/Results.jsx
index 04d1f84..1c38c8b 100644
--- a/src/client/react/components/container/Results.jsx
+++ b/src/client/react/components/container/Results.jsx
@@ -1,13 +1,28 @@
 import React from 'react';
+import PropTypes from 'prop-types';
 import { connect } from 'react-redux';
+import classnames from 'classnames';
 import Result from '../presentational/Result';
 
 const Results = (({ results }) => (
-  results.map(user => (
-    <Result key={user.value} user={user} />
-  ))
+  <div
+    className={classnames('search__results', {
+      'search__results--has-results': results.length > 0,
+    })}
+  >
+    {results.map(user => (
+      <Result key={user.value} user={user} />
+    ))}
+  </div>
 ));
 
+Results.propTypes = {
+  results: PropTypes.arrayOf(PropTypes.shape({
+    type: PropTypes.string,
+    value: PropTypes.value,
+  })).isRequired,
+};
+
 const mapStateToProps = state => ({
   results: state.search.results,
 });
-- 
cgit v1.1

