mirror of
https://github.com/jakejarvis/dark-mode.git
synced 2025-06-27 16:45:40 -04:00
expose an init function instead of exporting as module default
This commit is contained in:
@ -11,11 +11,11 @@
|
||||
|
||||
<button class="dark-mode-toggle">💡 Click to see the light... or not.</button>
|
||||
|
||||
<p><a href="https://github.com/jakejarvis/dark-mode-example" target="_blank" rel="noopener">View the source code</a> or <a href="https://jarv.is/notes/dark-mode/" target="_blank" rel="noopener">read the post</a>.</p>
|
||||
<p><a href="https://github.com/jakejarvis/dark-mode" target="_blank" rel="noopener">View the source code</a> or <a href="https://jarv.is/notes/dark-mode/" target="_blank" rel="noopener">read the post</a>.</p>
|
||||
|
||||
<script src="../dist/index.js"></script>
|
||||
<script>
|
||||
window.darkMode({
|
||||
window.darkMode.init({
|
||||
toggle: document.querySelector(".dark-mode-toggle"),
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user