Skip to content

Commit

Permalink
[system][material-ui] Move useMediaQuery to system (#39463)
Browse files Browse the repository at this point in the history
  • Loading branch information
justintoman authored Feb 21, 2024
1 parent b6bec6c commit ba52e0d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/mui-material/src/useMediaQuery/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default } from './useMediaQuery';
export * from './useMediaQuery';
export { default } from '@mui/system/useMediaQuery';
export * from '@mui/system/useMediaQuery';
3 changes: 1 addition & 2 deletions packages/mui-material/src/useMediaQuery/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
'use client';
export { default } from './useMediaQuery';
export { default } from '@mui/system/useMediaQuery';
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import useMediaQuery from './useMediaQuery';
import useMediaQuery from '@mui/system/useMediaQuery';

export default useMediaQuery;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import useMediaQuery from './useMediaQuery';
import useMediaQuery from '@mui/system/useMediaQuery';

// TODO v5: to deprecate in v4.x and remove in v5
export default function useMediaQueryTheme(...args) {
Expand Down
3 changes: 3 additions & 0 deletions packages/mui-system/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ export * from './useTheme';
export { default as useThemeWithoutDefault } from './useThemeWithoutDefault';
export * from './useThemeWithoutDefault';

export { default as useMediaQuery } from './useMediaQuery';
export * from './useMediaQuery';

export * from './colorManipulator';

export { default as ThemeProvider } from './ThemeProvider';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-system/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export { default as shape } from './createTheme/shape';
export { default as useThemeProps, getThemeProps } from './useThemeProps';
export { default as useTheme } from './useTheme';
export { default as useThemeWithoutDefault } from './useThemeWithoutDefault';
export { default as useMediaQuery } from './useMediaQuery';
export * from './colorManipulator';
export { default as ThemeProvider } from './ThemeProvider';
export { default as unstable_createCssVarsProvider } from './cssVars/createCssVarsProvider';
Expand Down
2 changes: 2 additions & 0 deletions packages/mui-system/src/useMediaQuery/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default } from './useMediaQuery';
export * from './useMediaQuery';
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';
import * as React from 'react';
import { getThemeProps } from '@mui/system/useThemeProps';
import useTheme from '@mui/system/useThemeWithoutDefault';
import useEnhancedEffect from '../utils/useEnhancedEffect';
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
import { getThemeProps } from '../useThemeProps';
import useTheme from '../useThemeWithoutDefault';

/**
* @deprecated Not used internally. Use `MediaQueryListEvent` from lib.dom.d.ts instead.
Expand Down

0 comments on commit ba52e0d

Please sign in to comment.