1
mirror of https://github.com/jakejarvis/dark-mode.git synced 2025-09-11 09:27:23 -04:00

remove unnecessary deps (now zero 😎)

This commit is contained in:
2021-08-04 15:19:54 -04:00
parent 4881b908e9
commit e4d7e4f61b
3 changed files with 22 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
[![npm (scoped)](https://img.shields.io/npm/v/@jakejarvis/dark-mode)](https://www.npmjs.com/package/@jakejarvis/dark-mode)
[![GitHub](https://img.shields.io/github/license/jakejarvis/dark-mode?color=violet)](LICENSE)
Very simple CSS dark/light mode toggler with saved preference via local storage & dynamic OS setting detection. Only ~700 bytes gzipped!
Very simple CSS dark/light mode toggler with saved preference via local storage & dynamic OS setting detection. Zero dependencies and only ~700 bytes gzipped!
- [View the example.](https://jakejarvis.github.io/dark-mode-example/)
- [Read the blog post.](https://jarv.is/notes/dark-mode/)
@@ -64,6 +64,11 @@ darkMode.init({
});
```
## To-Do
- [ ] Support more than two themes
- [ ] Add callback function `onChange` (or `onToggle` etc.) passed in as an option
## License
MIT