text: import React from 'react';
  import PropTypes from 'prop-types';
  import classNames from 'classnames';
  import { createClassNames } from '../core/utils';
  
  var cx = createClassNames('Hits');
  
  var Hits = function Hits(_ref) {
    var hits = _ref.hits,
        className = _ref.className,
        HitComponent = _ref.hitComponent;
    return (
      // Spread the hit on HitComponent instead of passing the full object. BC.
      // ex: <HitComponent {...hit} key={hit.objectID} />
      React.createElement(
        'div',
        { className: classNames(cx(''), className) },
        React.createElement(
          'ul',
          { className: cx('list') },
          hits.map(function (hit) {
            return React.createElement(
              'li',
              { className: cx('item'), key: hit.objectID },
              React.createElement(HitComponent, { hit: hit })
            );
          })
        )
      )
    );
  };
  
  Hits.propTypes = {
    hits: PropTypes.arrayOf(PropTypes.object).isRequired,
    className: PropTypes.string,
    hitComponent: PropTypes.func
  };
  
  Hits.defaultProps = {
    className: '',
    hitComponent: function hitComponent(props) {
      return React.createElement(
        'div',
        {
          style: {
            borderBottom: '1px solid #bbb',
            paddingBottom: '5px',
            marginBottom: '5px',
            wordBreak: 'break-all'
          }
        },
        JSON.stringify(props).slice(0, 100),
        '...'
      );
    }
  };
  
  export default Hits;