'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _icons = require('../../assets/icons/icons.svg');

var _icons2 = _interopRequireDefault(_icons);

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

var Icon = function Icon(props) {
  return _react2.default.createElement(
    'svg',
    props,
    _react2.default.createElement('use', { xlinkHref: _icons2.default + '#' + props.name })
  );
};

Icon.defaultProps = {
  height: '24',
  width: '24'
};

Icon.propTypes = {
  /**
   * The name of the button (see Iconography).
   */
  name: _react2.default.PropTypes.string.isRequired,
  /**
   * The width of the button.
   */
  width: _react2.default.PropTypes.string,
  /**
   * The height of the button.
   */
  height: _react2.default.PropTypes.string,
  /**
   * The color (fill) of the icon.
   */
  fill: _react2.default.PropTypes.string,
  /**
   * The CSS class of the icon.
   */
  className: _react2.default.PropTypes.string
};

exports.default = Icon;