Skip to content

Commit

Permalink
[material-ui] Add generic back to useMediaQuery to prevent a breaki…
Browse files Browse the repository at this point in the history
…ng change (#44455)
  • Loading branch information
siriwatknp authored Nov 20, 2024
1 parent 9c98e3f commit be2bac2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mui-material/src/useMediaQuery/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { Theme } from '../styles/createTheme';

export * from '@mui/system/useMediaQuery';

declare function useMediaQuery(
queryInput: string | ((theme: Theme) => string),
// TODO v7: remove the generic. It's only used to prevent a breaking change in v6 from system's useMediaQuery in https://github.com/mui/material-ui/pull/44339.
declare function useMediaQuery<T = Theme>(
queryInput: string | ((theme: T) => string),
options?: UseMediaQueryOptions,
): boolean;

Expand Down

0 comments on commit be2bac2

Please sign in to comment.