UNPKG

@bee-design/ui

Version:

Bee Design React UI Library.

51 lines (42 loc) 2.67 kB
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 IconDashboardComponent(iconProps, ref) { var _useContext = useContext(IconContext), _useContext$prefixCls = _useContext.prefixCls, prefixCls = _useContext$prefixCls === void 0 ? 'bee' : _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-dashboard") }); 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: "M41.808 24c.118 4.63-1.486 9.333-5.21 13m5.21-13h-8.309m8.309 0c-.112-4.38-1.767-8.694-4.627-12M24 6c5.531 0 10.07 2.404 13.18 6M24 6c-5.724 0-10.384 2.574-13.5 6.38M24 6v7.5M37.18 12 31 17.5m-20.5-5.12L17 17.5m-6.5-5.12C6.99 16.662 5.44 22.508 6.53 28m4.872 9c-2.65-2.609-4.226-5.742-4.873-9m0 0 8.97-3.5" }), /*#__PURE__*/React.createElement("path", { strokeLinejoin: "round", d: "M24 32a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 0V19" })); } var IconDashboard = /*#__PURE__*/React.forwardRef(IconDashboardComponent); IconDashboard.defaultProps = { isIcon: true }; IconDashboard.displayName = 'IconDashboard'; export default IconDashboard;