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

42 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 _classnames = _interopRequireDefault(require("classnames"));
var _omit = _interopRequireDefault(require("rc-util/lib/omit"));
var _configProvider = require("../config-provider");
var _Element = _interopRequireDefault(require("./Element"));
var _style = _interopRequireDefault(require("./style"));
const SkeletonButton = props => {
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
active,
block = false,
size = 'default'
} = props;
const {
getPrefixCls
} = React.useContext(_configProvider.ConfigContext);
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
const [wrapCSSVar, hashId, cssVarCls] = (0, _style.default)(prefixCls);
const otherProps = (0, _omit.default)(props, ['prefixCls']);
const cls = (0, _classnames.default)(prefixCls, `${prefixCls}-element`, {
[`${prefixCls}-active`]: active,
[`${prefixCls}-block`]: block
}, className, rootClassName, hashId, cssVarCls);
return wrapCSSVar( /*#__PURE__*/React.createElement("div", {
className: cls
}, /*#__PURE__*/React.createElement(_Element.default, Object.assign({
prefixCls: `${prefixCls}-button`,
size: size
}, otherProps))));
};
var _default = exports.default = SkeletonButton;