File tree 12 files changed +52
-2
lines changed
docs/src/modules/components
material-ui-lab/src/TreeView
12 files changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,8 @@ const PageContext = React.createContext({
9
9
pages : [ ] ,
10
10
} ) ;
11
11
12
+ if ( process . env . NODE_ENV !== 'production' ) {
13
+ PageContext . displayName = 'PageContext' ;
14
+ }
15
+
12
16
export default PageContext ;
Original file line number Diff line number Diff line change @@ -88,9 +88,13 @@ const highDensity = {
88
88
} ;
89
89
90
90
export const DispatchContext = React . createContext ( ( ) => {
91
- throw new Error ( 'Forgot to wrap component in ThemeContext.Provider ' ) ;
91
+ throw new Error ( 'Forgot to wrap component in `ThemeProvider` ' ) ;
92
92
} ) ;
93
93
94
+ if ( process . env . NODE_ENV !== 'production' ) {
95
+ DispatchContext . displayName = 'ThemeDispatchContext' ;
96
+ }
97
+
94
98
const useEnhancedEffect = typeof window === 'undefined' ? React . useEffect : React . useLayoutEffect ;
95
99
96
100
export function ThemeProvider ( props ) {
Original file line number Diff line number Diff line change @@ -3,4 +3,10 @@ import React from 'react';
3
3
/**
4
4
* @ignore - internal component.
5
5
*/
6
- export default React . createContext ( { } ) ;
6
+ const TreeViewContext = React . createContext ( { } ) ;
7
+
8
+ if ( process . env . NODE_ENV !== 'production' ) {
9
+ TreeViewContext . displayName = 'TreeViewContext' ;
10
+ }
11
+
12
+ export default TreeViewContext ;
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ const defaultOptions = {
28
28
29
29
export const StylesContext = React . createContext ( defaultOptions ) ;
30
30
31
+ if ( process . env . NODE_ENV !== 'production' ) {
32
+ StylesContext . displayName = 'StylesContext' ;
33
+ }
34
+
31
35
let injectFirstNode ;
32
36
33
37
function StylesProvider ( props ) {
Original file line number Diff line number Diff line change @@ -2,4 +2,8 @@ import React from 'react';
2
2
3
3
const ThemeContext = React . createContext ( null ) ;
4
4
5
+ if ( process . env . NODE_ENV !== 'production' ) {
6
+ ThemeContext . displayName = 'ThemeContext' ;
7
+ }
8
+
5
9
export default ThemeContext ;
Original file line number Diff line number Diff line change @@ -6,4 +6,8 @@ import React from 'react';
6
6
*/
7
7
const ExpansionPanelContext = React . createContext ( { } ) ;
8
8
9
+ if ( process . env . NODE_ENV !== 'production' ) {
10
+ ExpansionPanelContext . displayName = 'ExpansionPanelContext' ;
11
+ }
12
+
9
13
export default ExpansionPanelContext ;
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ import React from 'react';
5
5
*/
6
6
const FormControlContext = React . createContext ( ) ;
7
7
8
+ if ( process . env . NODE_ENV !== 'production' ) {
9
+ FormControlContext . displayName = 'FormControlContext' ;
10
+ }
11
+
8
12
export function useFormControl ( ) {
9
13
return React . useContext ( FormControlContext ) ;
10
14
}
Original file line number Diff line number Diff line change @@ -5,4 +5,8 @@ import React from 'react';
5
5
*/
6
6
const ListContext = React . createContext ( { } ) ;
7
7
8
+ if ( process . env . NODE_ENV !== 'production' ) {
9
+ ListContext . displayName = 'ListContext' ;
10
+ }
11
+
8
12
export default ListContext ;
Original file line number Diff line number Diff line change @@ -5,4 +5,8 @@ import React from 'react';
5
5
*/
6
6
const RadioGroupContext = React . createContext ( ) ;
7
7
8
+ if ( process . env . NODE_ENV !== 'production' ) {
9
+ RadioGroupContext . displayName = 'RadioGroupContext' ;
10
+ }
11
+
8
12
export default RadioGroupContext ;
Original file line number Diff line number Diff line change @@ -5,4 +5,8 @@ import React from 'react';
5
5
*/
6
6
const TableContext = React . createContext ( ) ;
7
7
8
+ if ( process . env . NODE_ENV !== 'production' ) {
9
+ TableContext . displayName = 'TableContext' ;
10
+ }
11
+
8
12
export default TableContext ;
Original file line number Diff line number Diff line change @@ -5,4 +5,8 @@ import React from 'react';
5
5
*/
6
6
const Tablelvl2Context = React . createContext ( ) ;
7
7
8
+ if ( process . env . NODE_ENV !== 'production' ) {
9
+ Tablelvl2Context . displayName = 'Tablelvl2Context' ;
10
+ }
11
+
8
12
export default Tablelvl2Context ;
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ import * as PropTypes from 'prop-types';
3
3
4
4
const Context = React . createContext ( ) ;
5
5
6
+ if ( process . env . NODE_ENV !== 'production' ) {
7
+ Context . displayName = 'RenderContext' ;
8
+ }
9
+
6
10
/**
7
11
* @ignore - internal component.
8
12
*/
You can’t perform that action at this time.
0 commit comments