UNPKG

drip-table

Version:

A tiny and powerful enterprise-class solution for building tables.

39 lines (36 loc) 1.86 kB
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /* * This file is part of the drip-table project. * @link : https://drip-table.jd.com/ * @author : Emil Zhai (root@derzh.com) * @modifier : Emil Zhai (root@derzh.com) * @copyright: Copyright (c) 2021 JD Network Technology Co., Ltd. */ import "./index.less"; import classNames from 'classnames'; import React from 'react'; var prefixCls = 'jfe-drip-table-rc-spin'; function Indicator() { return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", { className: classNames(prefixCls, "".concat(prefixCls, "-spinning")) }, /*#__PURE__*/React.createElement("span", { className: classNames("".concat(prefixCls, "-dot"), "".concat(prefixCls, "-dot-spin")) }, /*#__PURE__*/React.createElement("i", { className: "".concat(prefixCls, "-dot-item") }), /*#__PURE__*/React.createElement("i", { className: "".concat(prefixCls, "-dot-item") }), /*#__PURE__*/React.createElement("i", { className: "".concat(prefixCls, "-dot-item") }), /*#__PURE__*/React.createElement("i", { className: "".concat(prefixCls, "-dot-item") })))); } var Spin = /*#__PURE__*/React.memo(function (_ref) { var props = Object.assign({}, _ref); return /*#__PURE__*/React.createElement("div", { className: classNames("".concat(prefixCls, "-nested-loading"), props.className) }, props.spinning && /*#__PURE__*/React.createElement(Indicator, null), /*#__PURE__*/React.createElement("div", { className: classNames("".concat(prefixCls, "-container"), props.innerClassName, _defineProperty({}, "".concat(prefixCls, "-blur"), props.spinning)) }, props.tip, props.children)); }); export default Spin;