@mui/x-charts
Version:
The community edition of the Charts components (MUI X).
19 lines (18 loc) • 427 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.buildWarning = buildWarning;
function buildWarning(message, gravity = 'warning') {
let alreadyWarned = false;
return (...args) => {
if (!alreadyWarned) {
alreadyWarned = true;
if (gravity === 'error') {
console.error(message(...args));
} else {
console.warn(message(...args));
}
}
};
}
;