Skip to content

Commit

Permalink
feat: display Value instead of Enum for one-item enum
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Jun 28, 2018
1 parent 1812775 commit 78fa312
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Fields/EnumValues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export class EnumValues extends React.PureComponent<EnumValuesProps> {

return (
<div>
<FieldLabel>{type === 'array' ? 'Items' : ''} Enum:</FieldLabel>
<FieldLabel>
{type === 'array' ? 'Items' : ''} {values.length === 1 ? 'Value' : 'Enum'}:
</FieldLabel>
{values.map((value, idx) => (
<ExampleValue key={idx}>{JSON.stringify(value)} </ExampleValue>
))}
Expand Down

0 comments on commit 78fa312

Please sign in to comment.