all files / lib/icon/ index.js

32% Statements 8/25
25% Branches 4/16
25% Functions 1/4
70% Lines 7/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27    1×       1×   1×   1×   1×   1×   1×                    
'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; };
 
var _react = require('react');
 
var _react2 = _interopRequireDefault(_react);
 
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; }
 
exports.default = function (props) {
  var type = props.type,
      _props$className = props.className,
      className = _props$className === undefined ? '' : _props$className,
      _props$style = props.style,
      style = _props$style === undefined ? {} : _props$style,
      other = _objectWithoutProperties(props, ['type', 'className', 'style']);
 
  className += ' icon-' + type;
  return _react2.default.createElement('i', _extends({ className: className }, other));
};