UNPKG

@sitecore/sc-contenthub-blok

Version:

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

23 lines 1.14 kB
import { colorMap, whiteAlpha } from "./colors"; import { getStyle, normalizeFontNames, transparentize } from "./utils"; export const btnFontWeight = (getStyle("--btn-font-weight") || 600); export const btnFontFamily = normalizeFontNames(getStyle("--btn-font-family")) ?? "'-apple-system', 'system-ui', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Arial', 'sans-serif'"; export const btnTextTransform = (getStyle("--btn-text-transform") || "none"); export const buttonPadding = "0.375rem 0.75rem"; export const getGhostButtonBackgroundColor = (color, isDarkTheme, darkShade, lightShade) => { if (!isDarkTheme) { return colorMap[color][lightShade]; } return transparentize(colorMap[color][darkShade], 0.76); }; export const getSolidButtonBackgroundColor = (color, isDarkTheme, darkShade, lightShade) => { if (!isDarkTheme) { return colorMap[color][lightShade]; } if (isDarkTheme && color === "neutral") { return whiteAlpha[lightShade]; } return colorMap[color][darkShade]; }; //# sourceMappingURL=buttons.js.map