Files
gitbook/packages/react-openapi/src/OpenAPIServerURLVariable.tsx
T
2025-02-13 16:30:34 +01:00

15 lines
399 B
TypeScript

'use client';
import type { OpenAPIV3 } from '@gitbook/openapi-parser';
/**
* Interactive component to show the value of a server variable and let the user change it.
*/
export function OpenAPIServerURLVariable(props: {
name: string;
variable: OpenAPIV3.ServerVariableObject;
}) {
const { variable } = props;
return <span className="openapi-url-var">{variable.default}</span>;
}