22 lines
956 B
JavaScript
22 lines
956 B
JavaScript
"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; |