UNPKG

@adminium/ui

Version:

Arco Design React UI Library.

49 lines (44 loc) 1.57 kB
import _extends from "@babel/runtime/helpers/extends"; import React, { useContext } from 'react'; import { IconContext } from '../context'; function IconImageComponent(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-image` }; 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: "m24 33 9-9v9h-9Zm0 0-3.5-4.5L17 33h7Zm15 8H9a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h30a2 2 0 0 1 2 2v30a2 2 0 0 1-2 2ZM15 15h2v2h-2v-2Z" }), /*#__PURE__*/React.createElement("path", { fill: "currentColor", stroke: "none", d: "M33 33v-9l-9 9h9ZM23.5 33l-3-4-3 4h6Z" }), /*#__PURE__*/React.createElement("path", { fill: "currentColor", stroke: "none", d: "M15 15H17V17H15z" })); } const IconImage = /*#__PURE__*/React.forwardRef(IconImageComponent); IconImage.defaultProps = { isIcon: true }; IconImage.displayName = 'IconImage'; export default IconImage;