mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-06 21:30:21 +03:00
Fix: angle bracket display exception
This commit is contained in:
parent
0f4ae0196d
commit
575c61b5f4
|
@ -1,9 +1,9 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { TypeFormat, TypePrefix } from '../../common-elements/fields';
|
import { TypeFormat, TypePrefix } from '../../common-elements/fields';
|
||||||
import { ConstraintsView } from './FieldContstraints';
|
|
||||||
import { Pattern } from './Pattern';
|
|
||||||
import { SchemaModel } from '../../services';
|
import { SchemaModel } from '../../services';
|
||||||
import styled from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
|
import { ConstraintsView } from './FieldContstraints';
|
||||||
|
import { Pattern } from './Pattern';
|
||||||
|
|
||||||
export function ArrayItemDetails({ schema }: { schema: SchemaModel }) {
|
export function ArrayItemDetails({ schema }: { schema: SchemaModel }) {
|
||||||
if (!schema || (schema.type === 'string' && !schema.constraints.length)) return null;
|
if (!schema || (schema.type === 'string' && !schema.constraints.length)) return null;
|
||||||
|
@ -11,7 +11,7 @@ export function ArrayItemDetails({ schema }: { schema: SchemaModel }) {
|
||||||
return (
|
return (
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
[ items
|
[ items
|
||||||
{schema.displayFormat && <TypeFormat>{` <${schema.displayFormat}> `}</TypeFormat>}
|
{schema.displayFormat && <TypeFormat>{` <${schema.displayFormat}> `}</TypeFormat>}
|
||||||
<ConstraintsView constraints={schema.constraints} />
|
<ConstraintsView constraints={schema.constraints} />
|
||||||
<Pattern schema={schema} />
|
<Pattern schema={schema} />
|
||||||
{schema.items && <ArrayItemDetails schema={schema.items} />} ]
|
{schema.items && <ArrayItemDetails schema={schema.items} />} ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user