UNPKG

@choerodon/master

Version:
30 lines (23 loc) 1.55 kB
var _excluded = ["type", "className"]; function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } import React from 'react'; import classNames from 'classnames'; /** *这个组件要删掉了,用到的地方直接改成components里头的 * * @param {IconProps} props * @return {*} */ var C7NIcon = function Icon(props) { var type = props.type, _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, otherProps = _objectWithoutProperties(props, _excluded); var classString = classNames('icon', 'c7n-icon', "icon-".concat(type), className); // @ts-ignore return /*#__PURE__*/React.createElement("i", Object.assign({}, otherProps, { className: classString })); }; C7NIcon.displayName = 'C7NIcon'; export default C7NIcon;