UNPKG

@adminium/ui

Version:

Arco Design React UI Library.

48 lines (43 loc) 1.61 kB
import _extends from "@babel/runtime/helpers/extends"; import React, { useContext } from 'react'; import { IconContext } from '../context'; function IconShakeComponent(iconProps, ref) { const _useContext = useContext(IconContext), _useContext$prefixCls = _useContext.prefixCls, prefixCls = _useContext$prefixCls === void 0 ? 'arco' : _useContext$prefixCls; const spin = iconProps.spin, className = iconProps.className; const props = { "aria-hidden": true, focusable: false, ref, ...iconProps, className: `${className ? className + ' ' : ''}${prefixCls}-icon ${prefixCls}-icon-shake` }; if (spin) { props.className = `${props.className} ${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: "M43.092 27.536 31.778 38.849M20.465 4.91 9.15 16.221m9.192 14.85a1 1 0 1 1-1.414-1.415 1 1 0 0 1 1.414 1.414ZM6.323 28.95 19.05 41.678a1 1 0 0 0 1.415 0l21.213-21.213a1 1 0 0 0 0-1.415L28.95 6.322a1 1 0 0 0-1.415 0L6.322 27.536a1 1 0 0 0 0 1.414Z" }), /*#__PURE__*/React.createElement("circle", { cx: "17.637", cy: "30.364", r: "1", fill: "currentColor", stroke: "none", transform: "rotate(45 17.637 30.364)" })); } const IconShake = /*#__PURE__*/React.forwardRef(IconShakeComponent); IconShake.defaultProps = { isIcon: true }; IconShake.displayName = 'IconShake'; export default IconShake;