1.1.4 • Published 6 months ago
@types/use-color-scheme v1.1.4
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 definitions for use-color-scheme 1.1
// Project: https://github.com/mujo-code/use-color-scheme
// Definitions by: Marton Lederer <https://github.com/martonlederer>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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: Sat, 12 Jun 2021 20:31:08 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Marton Lederer.