@drivy/cobalt
Version:
Opinionated design system for Drivy's projects.
15 lines (13 loc) • 514 B
JavaScript
const getCSSVariableThemeColor = (colorThemeName) => {
return `var(--c-${colorThemeName})`;
};
const getComputedThemeColor = (colorThemeName) => {
if (colorThemeName === "current")
return "currentColor";
if (colorThemeName === "transparent")
return "transparent";
const styles = getComputedStyle(document.documentElement);
return styles.getPropertyValue(`--c-${colorThemeName}`);
};
export { getCSSVariableThemeColor, getComputedThemeColor };
//# sourceMappingURL=index.js.map