@payfit/unity-components
Version:
9 lines (8 loc) • 491 B
TypeScript
/**
* An hook to create and listen to media query on the fly.
* For performance consideration, whenever possible, consume it globally.
* @param query A query representing the media to listen
* @param fallbackValue A default value used as a fallback in unsupported media query environment (such as server)
* @returns Matching state: true if the document matches the media query, false otherwise
*/
export declare function useMediaQuery(query: string, fallbackValue?: boolean): boolean;