'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _airbnbPropTypes = require('airbnb-prop-types');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var IconLink = function IconLink(props) {
  return _react2.default.createElement(
    'span',
    { className: props.wrapperClasses.join(' ') },
    props.icon && props.icon.props.name && _react2.default.createElement(
      _react2.default.Fragment,
      null,
      props.icon,
      ' \xA0'
    ),
    props.link
  );
};

IconLink.propTypes = process.env.NODE_ENV !== "production" ? {
  icon: (0, _airbnbPropTypes.componentWithName)('Icon'),
  link: (0, _airbnbPropTypes.componentWithName)('Link'),
  wrapperClasses: _propTypes2.default.arrayOf(_propTypes2.default.string)
} : {};

IconLink.defaultProps = {
  wrapperClasses: []
};

exports.default = IconLink;
module.exports = exports['default'];