aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/presentational
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/components/presentational')
-rw-r--r--src/client/react/components/presentational/Result.jsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/react/components/presentational/Result.jsx b/src/client/react/components/presentational/Result.jsx
index a4a0b8e..80f65d4 100644
--- a/src/client/react/components/presentational/Result.jsx
+++ b/src/client/react/components/presentational/Result.jsx
@@ -1,10 +1,15 @@
import React from 'react';
import PropTypes from 'prop-types';
+import classnames from 'classnames';
import IconFromUserType from './IconFromUserType';
-const Result = ({ user }) => (
- <div className="search__result">
+const Result = ({ user, selected }) => (
+ <div
+ className={classnames('search__result', {
+ 'search__result--selected': selected,
+ })}
+ >
<div className="search__icon-wrapper"><IconFromUserType userType={user.type} /></div>
<div className="search__result__text">{user.value}</div>
</div>
@@ -15,6 +20,7 @@ Result.propTypes = {
value: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
}).isRequired,
+ selected: PropTypes.bool.isRequired,
};
export default Result;