@types/use-color-scheme
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/use-color-scheme

Weekly Downloads

10

Version

1.1.4

License

MIT

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • types