PromoCursed/node_modules/antd/lib/skeleton/Node.js
2024-08-20 23:25:37 +04:00

40 lines
1.6 KiB
JavaScript

"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _DotChartOutlined = _interopRequireDefault(require("@ant-design/icons/DotChartOutlined"));
var _classnames = _interopRequireDefault(require("classnames"));
var _configProvider = require("../config-provider");
var _style = _interopRequireDefault(require("./style"));
const SkeletonNode = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
style,
active,
children
} = props;
const {
getPrefixCls
} = React.useContext(_configProvider.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);
const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active
}, hashId, className, rootClassName, cssVarCls);
const content = children !== null && children !== void 0 ? children : /*#__PURE__*/React.createElement(_DotChartOutlined.default, null);
return wrapCSSVar( /*#__PURE__*/React.createElement("div", {
className: cls
}, /*#__PURE__*/React.createElement("div", {
className: (0, _classnames.default)(`${prefixCls}-image`, className),
style: style
}, content)));
};
var _default = exports.default = SkeletonNode;