theme-helper

Helpers for operating / listening change of theme

Usage no npm install needed!

<script type="module">
  import themeHelper from 'https://cdn.skypack.dev/theme-helper';
</script>

README

theme-helper

Helpers for operating / listening change of theme

Description

This repo will watch the class name change of document.documentElement ( aka. <html> ), and determine which theme is used.

Currently only two classes are allowed: theme-white, theme-black

Mainly for internal use in our company.

License

MIT