From f00f7adb339f0587c8cf4a82ac2dadebe6a25bfd Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Wed, 31 Jan 2018 16:13:02 +0100 Subject: Add click functionality to result --- src/client/react/components/presentational/Result.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/client/react/components/presentational') diff --git a/src/client/react/components/presentational/Result.js b/src/client/react/components/presentational/Result.js index 0b9e024..6d39a80 100644 --- a/src/client/react/components/presentational/Result.js +++ b/src/client/react/components/presentational/Result.js @@ -5,13 +5,17 @@ import users from '../../users'; import IconFromUserType from './IconFromUserType'; -const Result = ({ userId, isSelected }) => ( +const Result = ({ userId, isSelected, onClick }) => ( + // eslint-disable-next-line
-
+
+ +
{users.byId[userId].value}
); @@ -19,6 +23,7 @@ const Result = ({ userId, isSelected }) => ( Result.propTypes = { userId: PropTypes.string.isRequired, isSelected: PropTypes.bool.isRequired, + onClick: PropTypes.func.isRequired, }; export default Result; -- cgit v1.1