funuicss
Version:
React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting b
11 lines (10 loc) • 452 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCssVariableValue = getCssVariableValue;
function getCssVariableValue(name) {
// Convert name like "primary" into "--primary"
var variableName = name.startsWith('--') ? name : "--".concat(name);
// Get value from :root style
var rootStyles = getComputedStyle(document.documentElement);
return rootStyles.getPropertyValue(variableName).trim();
}