Skip to content

Commit c4fe87f

Browse files
committed
Fix docs border. Closes #247
1 parent c4c2bf3 commit c4fe87f

File tree

1 file changed

+10
-14
lines changed
  • packages/graphql-playground/src/components/Playground/DocExplorer

1 file changed

+10
-14
lines changed

packages/graphql-playground/src/components/Playground/DocExplorer/GraphDocs.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ class GraphDocs extends React.Component<
104104
// Schema is null when it explicitly does not exist, typically due to
105105
// an error during introspection.
106106
emptySchema = (
107-
<div className="error-container">
108-
{'No Schema Available'}
109-
</div>
107+
<div className="error-container">{'No Schema Available'}</div>
110108
)
111109
}
112110

@@ -144,8 +142,8 @@ class GraphDocs extends React.Component<
144142
background: rgba(0, 0, 0, 0.06);
145143
}
146144
.graph-docs {
147-
@p: .absolute, .right0, .h100;
148-
margin-right: -1px;
145+
@p: .absolute, .h100;
146+
right: -2px;
149147
}
150148
.graph-docs.open {
151149
z-index: 2000;
@@ -214,19 +212,17 @@ class GraphDocs extends React.Component<
214212
ref={this.setDocExplorerRef}
215213
>
216214
<div className="doc-explorer-container">
217-
{emptySchema &&
218-
<ColumnDoc>
219-
{emptySchema}
220-
</ColumnDoc>}
221-
{schema &&
215+
{emptySchema && <ColumnDoc>{emptySchema}</ColumnDoc>}
216+
{schema && (
222217
<RootColumn
223218
schema={schema}
224219
width={this.state.widthMap.root || columnWidth - 1}
225220
searchValue={this.state.searchValue}
226221
setWidth={this.setRootWidth}
227222
handleSearch={this.handleSearch}
228-
/>}
229-
{navStack.map((stack, index) =>
223+
/>
224+
)}
225+
{navStack.map((stack, index) => (
230226
<ColumnDoc
231227
key={index}
232228
width={this.state.widthMap[stack.field.path] || columnWidth}
@@ -237,8 +233,8 @@ class GraphDocs extends React.Component<
237233
level={index + 1}
238234
onSetWidth={this.setWidthMap(stack.field.path)}
239235
/>
240-
</ColumnDoc>,
241-
)}
236+
</ColumnDoc>
237+
))}
242238
</div>
243239
</div>
244240
</div>

0 commit comments

Comments
 (0)