mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
update types for @types/react-responsive@8.0.0 (#38329)
* describe useMediaQuery * update types according to source * update version * fix ci * add Context type
This commit is contained in:
committed by
Michael Crane
parent
0e54827ae7
commit
533c47930c
Vendored
+10
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-responsive 3.0
|
||||
// Type definitions for react-responsive 8.0
|
||||
// Project: http://github.com/contra/react-responsive
|
||||
// Definitions by: Alexey Svetliakov <https://github.com/asvetliakov>
|
||||
// Alec Hill <https://github.com/alechill>
|
||||
@@ -87,4 +87,13 @@ export interface MediaQueryProps extends MediaQueryAllQueryable {
|
||||
|
||||
declare class MediaQuery extends React.Component<MediaQueryProps> { }
|
||||
export function toQuery(matchers: Partial<MediaQueryAllQueryable>): string;
|
||||
|
||||
export const Context: React.Context<Partial<MediaQueryAllQueryable>>;
|
||||
|
||||
export function useMediaQuery(
|
||||
settings: Partial<MediaQueryAllQueryable & { query?: string }>,
|
||||
device?: MediaQueryTypes,
|
||||
callback?: (matches: boolean) => void
|
||||
): boolean;
|
||||
|
||||
export default MediaQuery;
|
||||
|
||||
Reference in New Issue
Block a user