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

22 lines
818 B
JavaScript

"use strict";
"use client";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _CloseCircleFilled = _interopRequireDefault(require("@ant-design/icons/CloseCircleFilled"));
const getAllowClear = allowClear => {
let mergedAllowClear;
if (typeof allowClear === 'object' && (allowClear === null || allowClear === void 0 ? void 0 : allowClear.clearIcon)) {
mergedAllowClear = allowClear;
} else if (allowClear) {
mergedAllowClear = {
clearIcon: /*#__PURE__*/_react.default.createElement(_CloseCircleFilled.default, null)
};
}
return mergedAllowClear;
};
var _default = exports.default = getAllowClear;