diff --git a/packages/compose/src/hooks/use-media-query/index.js b/packages/compose/src/hooks/use-media-query/index.js index 8c0f0844d6b1c..099845494c7ba 100644 --- a/packages/compose/src/hooks/use-media-query/index.js +++ b/packages/compose/src/hooks/use-media-query/index.js @@ -33,5 +33,5 @@ export default function useMediaQuery( query ) { }; }, [ query ] ); - return query && match; + return !! query && match; } diff --git a/packages/compose/tsconfig.json b/packages/compose/tsconfig.json index 460abe2c78339..cf90934801cef 100644 --- a/packages/compose/tsconfig.json +++ b/packages/compose/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "rootDir": "src", "declarationDir": "build-types", + "types": [ "gutenberg-env" ], }, "references": [ { "path": "../element" }, @@ -17,6 +18,8 @@ "src/hooks/use-async-list/**/*", "src/hooks/use-constrained-tabbing/**/*", "src/hooks/use-instance-id/**/*", + "src/hooks/use-media-query/**/*", + "src/hooks/use-reduced-motion/**/*", "src/utils/**/*" ] } diff --git a/typings/gutenberg-env/index.d.ts b/typings/gutenberg-env/index.d.ts index 660691553849d..efdd71bd32878 100644 --- a/typings/gutenberg-env/index.d.ts +++ b/typings/gutenberg-env/index.d.ts @@ -1,6 +1,7 @@ interface Environment { NODE_ENV: unknown; COMPONENT_SYSTEM_PHASE: number | undefined; + FORCE_REDUCED_MOTION: boolean | undefined; } interface Process { env: Environment;