Installation
npm install --save @types/use-color-scheme
Summary
This package contains type definitions for use-color-scheme (https://github.com/mujo-code/use-color-scheme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-color-scheme.
index.d.ts
type Preference = typeof PREFERENCES[keyof typeof PREFERENCES];
export const PREFERENCES: {
DARK: "dark";
LIGHT: "light";
NONE: "no-preference";
};
export const values: Array<typeof PREFERENCES[keyof typeof PREFERENCES]>;
export function makeQuery(pref: Preference): string;
export function matchPreference(pref: Preference): MediaQueryList;
export function getPreference(preferences: Preference[]): Preference;
export function attachListener(pref: Preference, setScheme: (pref: Preference) => void): () => void;
export function useColorScheme(): { scheme: Preference };
export {};
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Marton Lederer.