mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-05 12:50:18 +03:00
more className additions
This commit is contained in:
parent
9d80da4a6f
commit
5e1496efa6
|
@ -56,7 +56,7 @@ export class CallbackSamples extends React.Component<CallbackSamplesProps> {
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="operation-callback-samples">
|
||||||
<RightPanelHeader> Callback payload samples </RightPanelHeader>
|
<RightPanelHeader> Callback payload samples </RightPanelHeader>
|
||||||
|
|
||||||
<SamplesWrapper>
|
<SamplesWrapper>
|
||||||
|
|
|
@ -27,7 +27,7 @@ export class Extensions extends React.PureComponent<ExtensionsProps> {
|
||||||
<>
|
<>
|
||||||
{options.showExtensions &&
|
{options.showExtensions &&
|
||||||
Object.keys(exts).map(key => (
|
Object.keys(exts).map(key => (
|
||||||
<Extension key={key}>
|
<Extension key={key} className="operation-extension">
|
||||||
<FieldLabel> {key.substring(2)}: </FieldLabel>{' '}
|
<FieldLabel> {key.substring(2)}: </FieldLabel>{' '}
|
||||||
<ExtensionValue>
|
<ExtensionValue>
|
||||||
{typeof exts[key] === 'string' ? exts[key] : JSON.stringify(exts[key])}
|
{typeof exts[key] === 'string' ? exts[key] : JSON.stringify(exts[key])}
|
||||||
|
|
|
@ -55,8 +55,7 @@ export const Operation = observer(({ operation }: OperationProps): JSX.Element =
|
||||||
{externalDocs && <ExternalDocumentation externalDocs={externalDocs} />}
|
{externalDocs && <ExternalDocumentation externalDocs={externalDocs} />}
|
||||||
</Description>
|
</Description>
|
||||||
)}
|
)}
|
||||||
<Extensions extensions={operation.extensions} />{' '}
|
<Extensions extensions={operation.extensions} />
|
||||||
{/*TODO: className="operation-extensions"*/}
|
|
||||||
<SecurityRequirements securities={operation.security} />
|
<SecurityRequirements securities={operation.security} />
|
||||||
<Parameters parameters={operation.parameters} body={operation.requestBody} />
|
<Parameters parameters={operation.parameters} body={operation.requestBody} />
|
||||||
<ResponsesList responses={operation.responses} />
|
<ResponsesList responses={operation.responses} />
|
||||||
|
|
|
@ -79,7 +79,9 @@ export function BodyContent(props: {
|
||||||
{({ schema }) => {
|
{({ schema }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{description !== undefined && <Markdown source={description} />}
|
{description !== undefined && (
|
||||||
|
<Markdown source={description} className="request-body-description" />
|
||||||
|
)}
|
||||||
{schema?.type === 'object' && (
|
{schema?.type === 'object' && (
|
||||||
<ConstraintsView constraints={schema?.constraints || []} />
|
<ConstraintsView constraints={schema?.constraints || []} />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -26,7 +26,7 @@ export class RequestSamples extends React.Component<RequestSamplesProps> {
|
||||||
const hideTabList = samples.length === 1 ? this.context.hideSingleRequestSampleTab : false;
|
const hideTabList = samples.length === 1 ? this.context.hideSingleRequestSampleTab : false;
|
||||||
return (
|
return (
|
||||||
(hasSamples && (
|
(hasSamples && (
|
||||||
<div>
|
<div className="operation-request-samples">
|
||||||
<RightPanelHeader> {l('requestSamples')} </RightPanelHeader>
|
<RightPanelHeader> {l('requestSamples')} </RightPanelHeader>
|
||||||
|
|
||||||
<Tabs defaultIndex={0}>
|
<Tabs defaultIndex={0}>
|
||||||
|
@ -40,7 +40,7 @@ export class RequestSamples extends React.Component<RequestSamplesProps> {
|
||||||
{samples.map(sample => (
|
{samples.map(sample => (
|
||||||
<TabPanel key={sample.lang + '_' + (sample.label || '')}>
|
<TabPanel key={sample.lang + '_' + (sample.label || '')}>
|
||||||
{isPayloadSample(sample) ? (
|
{isPayloadSample(sample) ? (
|
||||||
<div>
|
<div className="request-payload">
|
||||||
<PayloadSamples content={sample.requestBodyContent} />
|
<PayloadSamples content={sample.requestBodyContent} />
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -23,7 +23,7 @@ export class ResponseSamples extends React.Component<ResponseSamplesProps> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(responses.length > 0 && (
|
(responses.length > 0 && (
|
||||||
<div>
|
<div className="operation-response-samples">
|
||||||
<RightPanelHeader> {l('responseSamples')} </RightPanelHeader>
|
<RightPanelHeader> {l('responseSamples')} </RightPanelHeader>
|
||||||
|
|
||||||
<Tabs defaultIndex={0}>
|
<Tabs defaultIndex={0}>
|
||||||
|
@ -36,7 +36,7 @@ export class ResponseSamples extends React.Component<ResponseSamplesProps> {
|
||||||
</TabList>
|
</TabList>
|
||||||
{responses.map(response => (
|
{responses.map(response => (
|
||||||
<TabPanel key={response.code}>
|
<TabPanel key={response.code}>
|
||||||
<div>
|
<div className="response-sample">
|
||||||
<PayloadSamples content={response.content!} />
|
<PayloadSamples content={response.content!} />
|
||||||
</div>
|
</div>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
|
@ -34,7 +34,7 @@ export class ArraySchema extends React.PureComponent<SchemaProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="array-schema">
|
||||||
<ArrayOpenningLabel> Array {minMaxItems}</ArrayOpenningLabel>
|
<ArrayOpenningLabel> Array {minMaxItems}</ArrayOpenningLabel>
|
||||||
<PaddedSchema>
|
<PaddedSchema>
|
||||||
<Schema {...this.props} schema={itemsSchema} />
|
<Schema {...this.props} schema={itemsSchema} />
|
||||||
|
|
|
@ -50,7 +50,7 @@ export const ObjectSchema = observer(
|
||||||
return (
|
return (
|
||||||
<PropertiesTable>
|
<PropertiesTable>
|
||||||
{showTitle && <PropertiesTableCaption>{title}</PropertiesTableCaption>}
|
{showTitle && <PropertiesTableCaption>{title}</PropertiesTableCaption>}
|
||||||
<tbody>
|
<tbody className="object-schema">
|
||||||
{mapWithLast(filteredFields, (field, isLast) => {
|
{mapWithLast(filteredFields, (field, isLast) => {
|
||||||
return (
|
return (
|
||||||
<Field
|
<Field
|
||||||
|
|
|
@ -51,7 +51,7 @@ export class OneOfSchema extends React.Component<SchemaProps> {
|
||||||
const activeSchema = oneOf[schema.activeOneOf];
|
const activeSchema = oneOf[schema.activeOneOf];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="oneOf-schema">
|
||||||
<OneOfLabel> {schema.oneOfType} </OneOfLabel>
|
<OneOfLabel> {schema.oneOfType} </OneOfLabel>
|
||||||
<OneOfList>
|
<OneOfList>
|
||||||
{oneOf.map((subSchema, idx) => (
|
{oneOf.map((subSchema, idx) => (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import type { SchemaProps } from '.';
|
||||||
|
|
||||||
export const RecursiveSchema = observer(({ schema }: SchemaProps) => {
|
export const RecursiveSchema = observer(({ schema }: SchemaProps) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="recursive-schema">
|
||||||
<TypeName>{schema.displayType}</TypeName>
|
<TypeName>{schema.displayType}</TypeName>
|
||||||
{schema.title && <TypeTitle> {schema.title} </TypeTitle>}
|
{schema.title && <TypeTitle> {schema.title} </TypeTitle>}
|
||||||
<RecursiveLabel> {l('recursive')} </RecursiveLabel>
|
<RecursiveLabel> {l('recursive')} </RecursiveLabel>
|
||||||
|
|
|
@ -87,7 +87,7 @@ export class Schema extends React.Component<Partial<SchemaProps>> {
|
||||||
} as any as FieldModel; // cast needed for hot-loader to not fail
|
} as any as FieldModel; // cast needed for hot-loader to not fail
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="field-details">
|
||||||
<FieldDetails field={field} />
|
<FieldDetails field={field} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -56,7 +56,7 @@ export function SecurityRequirements(props: SecurityRequirementsProps) {
|
||||||
{expanded &&
|
{expanded &&
|
||||||
operationSecuritySchemes?.length &&
|
operationSecuritySchemes?.length &&
|
||||||
operationSecuritySchemes.map((scheme, idx) => (
|
operationSecuritySchemes.map((scheme, idx) => (
|
||||||
<SecurityDetailsStyle key={idx}>
|
<SecurityDetailsStyle key={idx} className="security-details">
|
||||||
<h5>
|
<h5>
|
||||||
<LockIcon /> {AUTH_TYPES[scheme.type] || scheme.type}: {scheme.id}
|
<LockIcon /> {AUTH_TYPES[scheme.type] || scheme.type}: {scheme.id}
|
||||||
</h5>
|
</h5>
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const SourceCodeWithCopy = (props: SourceCodeProps) => {
|
||||||
return (
|
return (
|
||||||
<CopyButtonWrapper data={source}>
|
<CopyButtonWrapper data={source}>
|
||||||
{({ renderCopyButton }) => (
|
{({ renderCopyButton }) => (
|
||||||
<SampleControlsWrap>
|
<SampleControlsWrap className="request-code-sample">
|
||||||
<SampleControls>{renderCopyButton()}</SampleControls>
|
<SampleControls>{renderCopyButton()}</SampleControls>
|
||||||
<SourceCode lang={lang} source={source} />
|
<SourceCode lang={lang} source={source} />
|
||||||
</SampleControlsWrap>
|
</SampleControlsWrap>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user