UNPKG

css-theme-management

Version:

This package was created to ease the process of implementing multiple themes in an app.

13 lines (12 loc) 407 B
import loadProperty from './property_loader'; export var themeLoader = function (theme) { var themeProperties = Object.keys(theme); var rootStyle = getRootStyle(); themeProperties.forEach(function (element) { loadProperty(theme[element], rootStyle); }); }; export var getRootStyle = function () { return document.documentElement.style; }; export default themeLoader;