You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/antd/es/progress/utils.js

29 lines
685 B

import devWarning from '../_util/devWarning';
export function validProgress(progress) {
if (!progress || progress < 0) {
return 0;
}
if (progress > 100) {
return 100;
}
return progress;
}
export function getSuccessPercent(_ref) {
var success = _ref.success,
successPercent = _ref.successPercent;
var percent = successPercent;
/** @deprecated Use `percent` instead */
if (success && 'progress' in success) {
devWarning(false, 'Progress', '`success.progress` is deprecated. Please use `success.percent` instead.');
percent = success.progress;
}
if (success && 'percent' in success) {
percent = success.percent;
}
return percent;
}