File tree Expand file tree Collapse file tree 3 files changed +0
-20
lines changed
packages/material-ui/src/withMobileDialog Expand file tree Collapse file tree 3 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ https://material-ui.dev/* https://material-ui.com/:splat 301!
21
21
/r/ts-issue-template https://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwBQokscA3nXHAPSdwwAWWOLhKQAdllEx0ATwgBXOHNRYAJnQC+cIiXIABEMhhYowZABsAtHOCdhlMnToE5o-MAii4AESwgIACgBKVnYuHgBNeSghCBUsDSA 302
22
22
/r/custom-component-variants /customization/components/#adding-new-component-variants
23
23
/r/x-license https://material-ui.com/store/items/material-ui-x/
24
- /r/migration-v4 https://next.material-ui.com/guides/migration-v4/
25
24
26
25
# Legacy redirection
27
26
# Added in chronological order
Original file line number Diff line number Diff line change @@ -2,25 +2,12 @@ import * as React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
import withWidth , { isWidthDown } from '../withWidth' ;
4
4
5
- let warnedOnce = false ;
6
-
7
5
/**
8
6
* Dialog will responsively be full screen *at or below* the given breakpoint
9
7
* (defaults to 'sm' for mobile devices).
10
8
* Notice that this Higher-order Component is incompatible with server-side rendering.
11
9
*/
12
10
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
- }
24
11
const { breakpoint = 'sm' } = options ;
25
12
26
13
function WithMobileDialog ( props ) {
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { expect } from 'chai';
3
3
import { createShallow } from '@material-ui/core/test-utils' ;
4
4
import Dialog from '../Dialog' ;
5
5
import withMobileDialog from './withMobileDialog' ;
6
- import { consoleWarnMock } from 'test/utils/consoleErrorMock' ;
7
6
8
7
describe ( 'withMobileDialog' , ( ) => {
9
8
let shallow ;
@@ -13,11 +12,6 @@ describe('withMobileDialog', () => {
13
12
14
13
before ( ( ) => {
15
14
shallow = createShallow ( { dive : true } ) ;
16
- consoleWarnMock . spy ( ) ;
17
- } ) ;
18
-
19
- after ( ( ) => {
20
- consoleWarnMock . reset ( ) ;
21
15
} ) ;
22
16
23
17
function isFullScreen ( breakpoints , width ) {
You can’t perform that action at this time.
0 commit comments