UNPKG

mobile-more

Version:

基于 antd-mobile v5 扩展移动端 UI 组件

28 lines 1.38 kB
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; var _excluded = ["border", "icon", "bgColor", "style", "className"]; import * as React from 'react'; import { PlusLg } from 'doly-icons'; import classnames from 'classnames'; import { prefixClass } from '../../config'; import "./index.css"; var prefixCls = "".concat(prefixClass, "-image-uploader-uploadCustom"); var UploadCustom = /*#__PURE__*/React.forwardRef(function (_ref, ref) { var border = _ref.border, icon = _ref.icon, _ref$bgColor = _ref.bgColor, bgColor = _ref$bgColor === void 0 ? 'var(--adm-color-box)' : _ref$bgColor, style = _ref.style, className = _ref.className, restProps = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement("div", _objectSpread({ className: classnames(prefixCls, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-border"), border), "".concat(prefixCls, "-border-").concat(border), border), className), ref: ref, style: _objectSpread({ background: bgColor }, style) }, restProps), icon || /*#__PURE__*/React.createElement(PlusLg, null)); }); UploadCustom.displayName = 'UploadCustom'; export default UploadCustom;