@ozen-ui/kit
Version:
React component library
12 lines (11 loc) • 739 B
JavaScript
import { deprecate } from '@ozen-ui/logger';
import { isProduction } from '../../../constants/environment';
import { capitalizeFirstLetter } from '../../../utils/capitalizeFirstLetter';
export var useDeprecatedBase = function (_a) {
var typeProp = _a.type, name = _a.name, nameNext = _a.nameNext, isLogNeeded = _a.isLogNeeded;
if (isProduction || !isLogNeeded) {
return;
}
var type = typeProp.toLowerCase();
deprecate("".concat(capitalizeFirstLetter(type), " \u00AB").concat(name, "\u00BB deprecated.").concat(nameNext ? " \u0414\u043B\u044F \u0437\u0430\u043C\u0435\u043D\u044B \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 ".concat(type, " \u00AB").concat(nameNext, "\u00BB.") : ''));
};