@ohu-mobile/core
Version:
21 lines (20 loc) • 426 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getComponentStyle;
var _shared = require("./shared");
function getComponentStyle(root, color, fontColor) {
var style = {};
if (color) {
if (_shared.colors.includes(color)) {
root.is(color);
} else {
style.background = color;
}
}
if (fontColor) {
style.color = fontColor;
}
return style;
}