File tree Expand file tree Collapse file tree 2 files changed +25
-9
lines changed
packages/graphiql/src/components/common/Toolbar
plugins/doc-explorer-classic/src Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ export const Tabbar = () => (
25
25
< List >
26
26
< ListRow >
27
27
< ManagedTabs tabs = { [ 'One' , 'Two' , 'Three' ] } >
28
- < p > One</ p >
29
- < p > Two</ p >
30
- < p > Three</ p >
28
+ < p > { ' One' } </ p >
29
+ < p > { ' Two' } </ p >
30
+ < p > { ' Three' } </ p >
31
31
</ ManagedTabs >
32
32
</ ListRow >
33
33
< ListRow >
@@ -41,17 +41,17 @@ export const Tabbar = () => (
41
41
< small style = { { background : 'yellow' , padding : 3 } } > { '2' } </ small >
42
42
</ > ,
43
43
] } >
44
- < p > With</ p >
45
- < p > a </ p >
46
- < p > nested</ p >
47
- < p > component</ p >
44
+ < p > { ' With' } </ p >
45
+ < p > { 'a' } </ p >
46
+ < p > { ' nested' } </ p >
47
+ < p > { ' component' } </ p >
48
48
</ ManagedTabs >
49
49
</ ListRow >
50
50
< ListRow flex >
51
51
< div style = { { height : '100px' , display : 'grid' } } >
52
52
< ManagedTabs tabs = { [ 'Very tall' , 'tabs' ] } >
53
- < p > a </ p >
54
- < p > b </ p >
53
+ < p > { 'a' } </ p >
54
+ < p > { 'b' } </ p >
55
55
</ ManagedTabs >
56
56
</ div >
57
57
</ ListRow >
Original file line number Diff line number Diff line change
1
+ import * as React from 'react' ;
2
+
3
+ import { SchemaContext } from 'graphiql' ;
4
+
5
+ import { DocExplorer } from './DocExplorer' ;
6
+
7
+ /**
8
+ * Context Conusmer for rendering DocExplorer in GraphiQL.
9
+ */
10
+ export default function DocExplorerGraphiQL ( ) {
11
+ return (
12
+ < SchemaContext . Consumer >
13
+ { ( { schema } ) => < DocExplorer schema = { schema } /> }
14
+ </ SchemaContext . Consumer >
15
+ ) ;
16
+ }
You can’t perform that action at this time.
0 commit comments