Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/wojtekmaj/react-hooks. A collection of React Hooks.
hooks react react-hooks
Something went wrong. Try again.
371 B · 10 lines
TypeScript
at main
1234567891011import useMatchMedia from './useMatchMedia.js';
/** * Returns a flag which determines if the document matches `(forced-colors: active)` media feature. * * @returns {boolean | null} Whether the document matches `(forced-colors: active)` media feature */export default function useForcedColors(): boolean | null { return useMatchMedia('(forced-colors: active)');}