UNPKG

@brizy/ui

Version:
19 lines (18 loc) 989 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getFieldsStyleTheme = getFieldsStyleTheme; const colors_1 = require("./colors"); const constants_1 = require("../constants"); function getFieldsStyleTheme(theme) { if (theme) { const color = (theme === null || theme === void 0 ? void 0 : theme.color) ? { [`--${constants_1.BRZ_PREFIX}-input-color`]: (0, colors_1.getHexByColorType)(theme.color) } : {}; const background = (theme === null || theme === void 0 ? void 0 : theme.background) ? { [`--${constants_1.BRZ_PREFIX}-input-background`]: (0, colors_1.getHexByColorType)(theme.background) } : {}; const borderColor = theme.borderColor ? { [`--${constants_1.BRZ_PREFIX}-input-border-color`]: (0, colors_1.getHexByColorType)(theme.borderColor) } : {}; return Object.assign(Object.assign(Object.assign({}, color), background), borderColor); } return undefined; }