@material-ui/core
Version:
React components that implement Google's Material Design.
29 lines (23 loc) • 780 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function deprecatedPropType(validator, reason) {
/* istanbul ignore if */
if (process.env.NODE_ENV === 'production') {
return function () {
return null;
};
}
return function (props, propName, componentName, location, propFullName) {
var componentNameSafe = componentName || '<<anonymous>>';
var propFullNameSafe = propFullName || propName;
if (typeof props[propName] !== 'undefined') {
return new Error("The ".concat(location, " `").concat(propFullNameSafe, "` of ") + "`".concat(componentNameSafe, "` is deprecated. ").concat(reason));
}
return null;
};
}
var _default = deprecatedPropType;
exports.default = _default;
;