Skip to content

Commit f3925b6

Browse files
committed
fix: add doc wrapper
1 parent d199a94 commit f3925b6

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

packages/graphiql/src/components/common/Toolbar/Tabs.stories.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export const Tabbar = () => (
2525
<List>
2626
<ListRow>
2727
<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>
3131
</ManagedTabs>
3232
</ListRow>
3333
<ListRow>
@@ -41,17 +41,17 @@ export const Tabbar = () => (
4141
<small style={{ background: 'yellow', padding: 3 }}>{'2'}</small>
4242
</>,
4343
]}>
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>
4848
</ManagedTabs>
4949
</ListRow>
5050
<ListRow flex>
5151
<div style={{ height: '100px', display: 'grid' }}>
5252
<ManagedTabs tabs={['Very tall', 'tabs']}>
53-
<p>a</p>
54-
<p>b</p>
53+
<p>{'a'}</p>
54+
<p>{'b'}</p>
5555
</ManagedTabs>
5656
</div>
5757
</ListRow>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
}

0 commit comments

Comments
 (0)