# All files / components/Logo Logo.js

83.33% Statements 5/6
100% Branches 0/0
0% Functions 0/1
83.33% Lines 5/6

    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

    4x

    4x

    4x

    4x

    4x

     import React from 'react';
    import PropTypes from 'prop-types';
    import { withProps } from 'recompose';
    import LogoImage from './styles/LogoImage';
    import logo from './logo.png';

    const Logo = ({ id, className, Image }) => (
      <Image src={logo} id={id} className={className} />
    );

    Logo.propTypes = {
      /**
       * Adds a class name to the logo image.
       */
      className: PropTypes.string,
      /**
       * Adds an id to the logo image.
       */
      id: PropTypes.string,
      /**
       * An img element component to render the image itself
       */
      Image: PropTypes.func,
    };

    Logo.defaultProps = {
      className: null,
      id: null,
      Image: LogoImage,
    };

    Logo.Small = withProps({
      Image: LogoImage.Small,
    })(Logo);
    Logo.Large = withProps({
      Image: LogoImage.Large,
    })(Logo);

    export default Logo;