All files / src/components/StudentCard/Person index.jsx

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49                    3x 4x           4x                             3x                                
import styles from './style.postcss';
 
import React from 'react';
import pure from 'recompose/pure';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import Person from 'components/Person';
import StudentPicture from 'components/StudentPicture';
import ProductionStatus from 'components/ProductionStatus';
 
const PersonComp = (props) => {
  const classes = classnames(styles.Person,
      styles.__1, {
        [styles.__backgroundless]: props.backgroundless,
        [styles.__vertical]: props.vertical,
      }, props.className);
 
  return <Person className={classes} vertical={props.vertical}>
    <StudentPicture src={props.avatarUrl}
        gender={props.gender}
        className={classnames(styles.Person_picture, {
          [styles.__bigger]: !! props.withBiggerAvatar,
          [styles.__vertical]: !! props.vertical,
        })} />
    {props.nameNode}
    {props.localNameNode}
    <ProductionStatus className={props.statusClassName}
        status={props.status}
        highlighted={props.statusHighlighted} />
  </Person>;
};
 
PersonComp.propTypes = {
  className: PropTypes.string,
  statusClassName: PropTypes.string,
  pictureClassName: PropTypes.string,
  avatarUrl: PropTypes.string,
  gender: PropTypes.string,
  nameNode: PropTypes.node,
  localNameNode: PropTypes.node,
  status: PropTypes.string,
  statusHighlighted: PropTypes.bool,
  backgroundless: PropTypes.bool,
  vertical: PropTypes.bool,
  withBiggerAvatar: PropTypes.bool,
};
 
export default pure(PersonComp);