import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

import './card-icon.scss';

const CardIcon = ({ className, horizontal, ...props }) => (
  <img
    className={className}
    alt="icon"
    styleName={classNames('icon', { 'icon--horizontal': horizontal })}
    {...props}
  />
);

CardIcon.componentName = 'CardIcon';

CardIcon.propTypes = {
  /** @ignore */
  className: PropTypes.string,
  horizontal: PropTypes.bool
};

CardIcon.defaultProps = {
  className: undefined,
  horizontal: false
};

export default CardIcon;
