mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
feat: display Value instead of Enum for one-item enum
This commit is contained in:
parent
1812775cd0
commit
78fa31225a
|
@ -15,7 +15,9 @@ export class EnumValues extends React.PureComponent<EnumValuesProps> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<FieldLabel>{type === 'array' ? 'Items' : ''} Enum:</FieldLabel>
|
<FieldLabel>
|
||||||
|
{type === 'array' ? 'Items' : ''} {values.length === 1 ? 'Value' : 'Enum'}:
|
||||||
|
</FieldLabel>
|
||||||
{values.map((value, idx) => (
|
{values.map((value, idx) => (
|
||||||
<ExampleValue key={idx}>{JSON.stringify(value)} </ExampleValue>
|
<ExampleValue key={idx}>{JSON.stringify(value)} </ExampleValue>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user