@netdata/netdata-ui
Version:
netdata UI kit
68 lines (66 loc) • 1.75 kB
JavaScript
;
exports.__esModule = true;
exports.masterCardColorMap = exports.getPillColor = exports.getMasterCardColor = void 0;
var colorMap = {
background: {
neutral: "nodeBadgeBackground",
success: "success",
clear: "success",
warning: "warning",
error: "error",
critical: "error",
stale: "stale",
idleClear: "idleClear",
idleError: "idleError",
idleWarning: "idleWarning"
},
border: {
neutral: "nodeBadgeBackground",
success: "success",
clear: "success",
warning: "warning",
error: "error",
critical: "error",
stale: "stale",
idleClear: "idleClear",
idleError: "idleError",
idleWarning: "idleWarning"
},
hollow: {
neutral: "neutralPillBorder",
success: "successSemi",
clear: "successSemi",
warning: "warningSemi",
error: "errorSemi",
critical: "errorSemi",
stale: "staleSemi"
},
color: {
neutral: "neutralPillColor",
success: "success",
clear: "success",
warning: "warning",
error: "error",
critical: "error",
stale: "stale",
idleClear: "idleClear",
idleError: "idleError",
idleWarning: "idleWarning"
}
};
// TODO deprecated them by taking care all the mastcards in app
var masterCardColorMap = exports.masterCardColorMap = {
alert: "alertIcon",
disabledClear: "idleClear",
disabledError: "errorSemi",
disabledWarning: "idleWarning",
clear: "success",
error: "error",
warning: "warning"
};
var getMasterCardColor = exports.getMasterCardColor = function getMasterCardColor(flavour) {
return masterCardColorMap[flavour];
};
var getPillColor = exports.getPillColor = function getPillColor(type, flavour) {
return colorMap[type][flavour] || colorMap[type].neutral;
};