Fix OpenAPI try it button justify (#3975)

This commit is contained in:
Nolann B.
2026-02-05 11:16:58 +01:00
committed by GitHub
parent a3eed52f24
commit 717ad0b300
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@gitbook/react-openapi": patch
---
Fix Scalar Try it button justification
@@ -214,7 +214,7 @@ function OpenAPICodeSampleFooter(props: {
const { specUrl } = context;
const hideTryItPanel = data['x-hideTryItPanel'] || data.operation['x-hideTryItPanel'];
const hasMultipleMediaTypes =
renderers.length > 1 || renderers.some((renderer) => renderer.examples.length > 0);
renderers.length >= 2 || renderers.some((renderer) => renderer.examples.length >= 2);
// Check if any server has a host that can be used in an HTTP request
const hasValidHost = hasValidServerHost(servers);