'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

exports.default = Octicon;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

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

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function Octicon(_ref) {
  let icon = _ref.icon,
      others = _objectWithoutProperties(_ref, ['icon']);

  const classes = (0, _classnames2.default)('icon', `icon-${icon}`, others.className);
  return _react2.default.createElement('span', _extends({}, others, { className: classes }));
}

Octicon.propTypes = {
  icon: _propTypes2.default.string.isRequired
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9jdGljb24uanMiXSwibmFtZXMiOlsiT2N0aWNvbiIsImljb24iLCJvdGhlcnMiLCJjbGFzc2VzIiwiY2xhc3NOYW1lIiwicHJvcFR5cGVzIiwic3RyaW5nIiwiaXNSZXF1aXJlZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7a0JBSXdCQSxPOztBQUp4Qjs7OztBQUNBOzs7O0FBQ0E7Ozs7Ozs7O0FBRWUsU0FBU0EsT0FBVCxPQUFvQztBQUFBLE1BQWxCQyxJQUFrQixRQUFsQkEsSUFBa0I7QUFBQSxNQUFUQyxNQUFTOztBQUNqRCxRQUFNQyxVQUFVLDBCQUFHLE1BQUgsRUFBWSxRQUFPRixJQUFLLEVBQXhCLEVBQTJCQyxPQUFPRSxTQUFsQyxDQUFoQjtBQUNBLFNBQU8sbUR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