Skip to content

Commit 5a2f882

Browse files
Revert "[Dialog] Add deprecation warning for withMobileDialog (mui#23570)"
This reverts commit 4f389f8.
1 parent 6bc5beb commit 5a2f882

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

docs/public/_redirects

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ https://material-ui.dev/* https://material-ui.com/:splat 301!
2121
/r/ts-issue-template https://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwBQokscA3nXHAPSdwwAWWOLhKQAdllEx0ATwgBXOHNRYAJnQC+cIiXIABEMhhYowZABsAtHOCdhlMnToE5o-MAii4AESwgIACgBKVnYuHgBNeSghCBUsDSA 302
2222
/r/custom-component-variants /customization/components/#adding-new-component-variants
2323
/r/x-license https://material-ui.com/store/items/material-ui-x/
24-
/r/migration-v4 https://next.material-ui.com/guides/migration-v4/
2524

2625
# Legacy redirection
2726
# Added in chronological order

packages/material-ui/src/withMobileDialog/withMobileDialog.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,12 @@ import * as React from 'react';
22
import PropTypes from 'prop-types';
33
import withWidth, { isWidthDown } from '../withWidth';
44

5-
let warnedOnce = false;
6-
75
/**
86
* Dialog will responsively be full screen *at or below* the given breakpoint
97
* (defaults to 'sm' for mobile devices).
108
* Notice that this Higher-order Component is incompatible with server-side rendering.
119
*/
1210
const withMobileDialog = (options = {}) => (Component) => {
13-
if (process.env.NODE_ENV !== 'production') {
14-
if (!warnedOnce) {
15-
console.warn(
16-
[
17-
'Material-UI: The `withMobileDialog` function is deprecated.',
18-
'Head to https://material-ui.com/r/migration-v4/#dialog for a migration path.',
19-
].join('\n'),
20-
);
21-
warnedOnce = true;
22-
}
23-
}
2411
const { breakpoint = 'sm' } = options;
2512

2613
function WithMobileDialog(props) {

packages/material-ui/src/withMobileDialog/withMobileDialog.test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { expect } from 'chai';
33
import { createShallow } from '@material-ui/core/test-utils';
44
import Dialog from '../Dialog';
55
import withMobileDialog from './withMobileDialog';
6-
import { consoleWarnMock } from 'test/utils/consoleErrorMock';
76

87
describe('withMobileDialog', () => {
98
let shallow;
@@ -13,11 +12,6 @@ describe('withMobileDialog', () => {
1312

1413
before(() => {
1514
shallow = createShallow({ dive: true });
16-
consoleWarnMock.spy();
17-
});
18-
19-
after(() => {
20-
consoleWarnMock.reset();
2115
});
2216

2317
function isFullScreen(breakpoints, width) {

0 commit comments

Comments
 (0)