0.0.3 • Published 2 years ago

@dumbjs/persona v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@dumbjs/persona

Low level controls to build browser theming engine

API

const getTheme: ({ storageKey }?: { storageKey?: string }) => string;

const getSystemTheme: () => "dark" | "light";

const removeTheme: ({
  element,
  clearStorage,
  storageKey,
}?: {
  element?: HTMLElement;
  clearStorage?: boolean;
  storageKey?: string;
}) => void;

const getThemeFromStorage: (storageKey?: string) => string;

const isThemerEnabled: ({ storageKey }?: { storageKey?: string }) => boolean;

const setTheme: (
  theme: string,
  {
    element,
    storageKey,
    store,
  }: {
    element?: HTMLElement;
    storageKey?: string;
    store?: boolean;
  }
) => void;

const onThemeChange: (handler: (systemTheme: string) => void) => void;
0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago