UNPKG

@sitecore/sc-contenthub-blok

Version:

A UI library for [Sitecore Content Hub](https://doc.sitecore.com/ch/).

28 lines 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSolidButtonBackgroundColor = exports.getGhostButtonBackgroundColor = exports.buttonPadding = exports.btnTextTransform = exports.btnFontFamily = exports.btnFontWeight = void 0; const colors_1 = require("./colors"); const utils_1 = require("./utils"); exports.btnFontWeight = ((0, utils_1.getStyle)("--btn-font-weight") || 600); exports.btnFontFamily = (0, utils_1.normalizeFontNames)((0, utils_1.getStyle)("--btn-font-family")) ?? "'-apple-system', 'system-ui', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Arial', 'sans-serif'"; exports.btnTextTransform = ((0, utils_1.getStyle)("--btn-text-transform") || "none"); exports.buttonPadding = "0.375rem 0.75rem"; const getGhostButtonBackgroundColor = (color, isDarkTheme, darkShade, lightShade) => { if (!isDarkTheme) { return colors_1.colorMap[color][lightShade]; } return (0, utils_1.transparentize)(colors_1.colorMap[color][darkShade], 0.76); }; exports.getGhostButtonBackgroundColor = getGhostButtonBackgroundColor; const getSolidButtonBackgroundColor = (color, isDarkTheme, darkShade, lightShade) => { if (!isDarkTheme) { return colors_1.colorMap[color][lightShade]; } if (isDarkTheme && color === "neutral") { return colors_1.whiteAlpha[lightShade]; } return colors_1.colorMap[color][darkShade]; }; exports.getSolidButtonBackgroundColor = getSolidButtonBackgroundColor; //# sourceMappingURL=buttons.js.map