aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/presentational/Result.jsx
blob: a4a0b8e8e962d9d661478111fe2227f87efb7911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import React from 'react';
import PropTypes from 'prop-types';

import IconFromUserType from './IconFromUserType';

const Result = ({ user }) => (
  <div className="search__result">
    <div className="search__icon-wrapper"><IconFromUserType userType={user.type} /></div>
    <div className="search__result__text">{user.value}</div>
  </div>
);

Result.propTypes = {
  user: PropTypes.shape({
    value: PropTypes.string.isRequired,
    type: PropTypes.string.isRequired,
  }).isRequired,
};

export default Result;