Skip to content

Commit 78fa312

Browse files
committed
feat: display Value instead of Enum for one-item enum
1 parent 1812775 commit 78fa312

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Fields/EnumValues.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export class EnumValues extends React.PureComponent<EnumValuesProps> {
1515

1616
return (
1717
<div>
18-
<FieldLabel>{type === 'array' ? 'Items' : ''} Enum:</FieldLabel>
18+
<FieldLabel>
19+
{type === 'array' ? 'Items' : ''} {values.length === 1 ? 'Value' : 'Enum'}:
20+
</FieldLabel>
1921
{values.map((value, idx) => (
2022
<ExampleValue key={idx}>{JSON.stringify(value)} </ExampleValue>
2123
))}

0 commit comments

Comments
 (0)