Skip to content

add usePreferredColorScheme #6

@logaretm

Description

@logaretm

This API should track color scheme preference of the user.

Should look like this:

const theme = usePreferredColorScheme();

// theme can be either "dark", "light" or "no-preference".

Hint: Check the window.matchMedia function.

Don't forget to add docs for it as well!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions