1
mirror of https://github.com/jakejarvis/dark-mode.git synced 2025-06-27 17:55:40 -04:00

small cleanup

This commit is contained in:
2021-08-05 08:41:45 -04:00
parent 7e2e8948ec
commit 755ac19dba
3 changed files with 3 additions and 3 deletions

View File

@ -16,3 +16,4 @@ jobs:
node-version: '14.x'
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn build

4
src/index.d.ts vendored
View File

@ -3,6 +3,6 @@ export function init(options?: {
classes?: { dark: string, light: string };
default?: string;
storageKey?: string;
onInit?: (toggle?: HTMLElement) => void;
onChange?: (theme?: string, toggle?: HTMLElement) => void;
onInit?: (toggle?: HTMLElement) => unknown;
onChange?: (theme?: string, toggle?: HTMLElement) => unknown;
}): void;

View File

@ -1,7 +1,6 @@
"use strict";
const init = function (options) {
// { toggle, classes: { light, dark }, default, storageKey }
options = options || {};
// use a specified element(s) to trigger swap when clicked