diff options
Diffstat (limited to 'src/client/react/components/presentational')
-rw-r--r-- | src/client/react/components/presentational/Result.js | 9 |
1 files changed, 7 insertions, 2 deletions
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 <div className={classnames('search__result', { 'search__result--selected': isSelected, })} + onClick={onClick} > - <div className="search__icon-wrapper"><IconFromUserType userType={users.byId[userId].type} /></div> + <div className="search__icon-wrapper"> + <IconFromUserType userType={users.byId[userId].type} /> + </div> <div className="search__result__text">{users.byId[userId].value}</div> </div> ); @@ -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; |