2.0.2 • Published 4 years ago
theme-changer v2.0.2
theme-changer
The best theme changer ever written in TypeScript
Methods
loadTheme(colors)
Recieve a hash of colors, that contains keys light and dark and set theme related in browser
setTheme(color)
Recieve a hash of colors written like CSS variables and set theme in browser
toggleTheme(colors)
Recieve a hash of colors, that contains keys light and dark and if is dark put light and if is light put dark
isDark()
Returns true if localStorage has property theme and that property has dark as value
isLight()
Returns true if localStorage has property theme and that property has light as value