mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-18 00:25:07 +00:00
17 lines
467 B
TypeScript
17 lines
467 B
TypeScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
import classNames from 'classnames';
|
|
import { OpenAPIV3 } from 'openapi-types';
|
|
|
|
/**
|
|
* 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={classNames('openapi-url-var')}>{variable.default}</span>;
|
|
}
|