PromoCursed/node_modules/antd/lib/_util/statusUtils.js

22 lines
956 B
JavaScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMergedStatus = void 0;
exports.getStatusClassNames = getStatusClassNames;
var _classnames = _interopRequireDefault(require("classnames"));
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InputStatuses = ['warning', 'error', ''];
function getStatusClassNames(prefixCls, status, hasFeedback) {
return (0, _classnames.default)({
[`${prefixCls}-status-success`]: status === 'success',
[`${prefixCls}-status-warning`]: status === 'warning',
[`${prefixCls}-status-error`]: status === 'error',
[`${prefixCls}-status-validating`]: status === 'validating',
[`${prefixCls}-has-feedback`]: hasFeedback
});
}
const getMergedStatus = (contextStatus, customStatus) => customStatus || contextStatus;
exports.getMergedStatus = getMergedStatus;