@arco-design/web-react
Version:
Arco Design React UI Library.
48 lines (39 loc) • 2.43 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
import React, { useContext } from 'react';
import { IconContext } from '../context';
function IconBulbComponent(iconProps, ref) {
var _useContext = useContext(IconContext),
_useContext$prefixCls = _useContext.prefixCls,
prefixCls = _useContext$prefixCls === void 0 ? 'arco' : _useContext$prefixCls;
var spin = iconProps.spin,
className = iconProps.className;
var props = _objectSpread(_objectSpread({
"aria-hidden": true,
focusable: false,
ref: ref
}, iconProps), {}, {
className: "".concat(className ? className + ' ' : '').concat(prefixCls, "-icon ").concat(prefixCls, "-icon-bulb")
});
if (spin) {
props.className = "".concat(props.className, " ").concat(prefixCls, "-icon-loading");
}
delete props.spin;
delete props.isIcon;
return /*#__PURE__*/React.createElement("svg", _extends({
fill: "none",
stroke: "currentColor",
strokeWidth: "4",
viewBox: "0 0 48 48"
}, props), /*#__PURE__*/React.createElement("path", {
d: "M17 42h14m6-24c0 2.823-.9 5.437-2.43 7.568-1.539 2.147-3.185 4.32-3.77 6.897l-.623 2.756A1 1 0 0 1 29.2 36H18.8a1 1 0 0 1-.976-.779l-.624-2.756c-.584-2.576-2.23-4.75-3.77-6.897A12.94 12.94 0 0 1 11 18c0-7.18 5.82-13 13-13s13 5.82 13 13Z"
}));
}
var IconBulb = /*#__PURE__*/React.forwardRef(IconBulbComponent);
IconBulb.defaultProps = {
isIcon: true
};
IconBulb.displayName = 'IconBulb';
export default IconBulb;