ur-ui-kit-tm
Version:
unlimited robotics ui kit
22 lines (21 loc) • 1.86 kB
JavaScript
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
import { css } from "styled-components";
import { TextTypeEnum } from "./text.types";
export var getStyledColor = function (_a) {
var type = _a.type, color = _a.color, customProps = _a.customProps;
switch (type) {
case TextTypeEnum.Title:
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-weight: bold;\n font-size: 2rem;\n color: ", ";\n ", "\n "], ["\n font-weight: bold;\n font-size: 2rem;\n color: ", ";\n ", "\n "])), color, customProps);
case TextTypeEnum.Normal:
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n font-size: 1.6rem;\n ", "\n "], ["\n color: ", ";\n font-size: 1.6rem;\n ", "\n "])), color, customProps);
case TextTypeEnum.Small:
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 1.4rem;\n opacity: 0.75;\n color: ", ";\n ", "\n "], ["\n font-size: 1.4rem;\n opacity: 0.75;\n color: ", ";\n ", "\n "])), color, customProps);
default:
// case not considered
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n font-size: 1.8rem;\n ", "\n "], ["\n color: ", ";\n font-size: 1.8rem;\n ", "\n "])), color, customProps);
}
};
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;