easy-darkmode-toggle
v1.0.4
Published
toggle darkmode
Downloads
9
Readme
What is this ?
Get instant darkmode toggle code without writing .
Installation
npm install easy-darkmode-toggle --save
Then...
...
import { Darkmode } from 'easy-darkmode-toggle'
const dark = new Darkmode('#App')
dark.toggle()
...
EXAMPLE
import { Darkmode } from 'easy-darkmode-toggle';
const dark = new Darkmode('body')
const btn = document.getElementByName('button');
btn.addEventListener('click', () => {
dark.toggle()
})