Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,16 @@ Defaults to ```false```

https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema

#### hideLoading (optional)

```js
<RedoclyAPIBlock src="URL pointing to your open api yaml file." hideLoading />
```

When set to `true` it disables the loading spinner when rendering an OpenAPI file client-side.

Defaults to ```false```.

#### hideTryItPanel (optional)

```js
Expand Down
5 changes: 5 additions & 0 deletions example/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ module.exports = {
description: 'This is the OpenAPI page of Adobe Analytics',
path: '/api/index.md/'
},
{
title: 'Analytics API - RedoclyAPIBlock',
description: 'This is the OpenAPI page of Adobe Analytics',
path: '/api-2.md/'
},
{
title: 'Analytics Swagger file',
description: 'External link',
Expand Down
5 changes: 5 additions & 0 deletions example/src/pages/api-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: OpenAPI - Adobe Analytics
layout: none
---
<RedoclyAPIBlock src="https://petstore3.swagger.io/api/v3/openapi.json" />
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const RedoclyAPIBlock = ({
disableSidebar = false,
disableSearch = false,
ctrlFHijack = true,
hideLoading = false,
hideTryItPanel = false,
scrollYOffset = 0,
sortOperationsAlphabetically = false,
Expand Down Expand Up @@ -79,7 +80,7 @@ const RedoclyAPIBlock = ({
jsonSampleExpandLevel: ${jsonSampleExpandLevel === all ? `'${jsonSampleExpandLevel}'` : jsonSampleExpandLevel},
${generateCodeSamples ? "generateCodeSamples: { " + generateCodeSamples + "}," : ''}
${requestInterceptor ? "requestInterceptor: " + requestInterceptor + "," : ''}
hideLoading: true,
hideLoading: ${hideLoading},
theme: {
${typography ? "typography: { " + typography + "}," : ''}
rightPanel: {
Expand All @@ -104,6 +105,7 @@ RedoclyAPIBlock.propTypes = {
codeBlock: PropTypes.string,
disableSidebar: PropTypes.bool,
disableSearch: PropTypes.bool,
hideLoading: PropTypes.bool,
hideTryItPanel: PropTypes.bool,
scrollYOffset: PropTypes.number,
sortOperationsAlphabetically: PropTypes.bool,
Expand Down
Loading