Skip to content

Commit

Permalink
fix: clean up field values display (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
drjonnicholson authored and RomanHotsiy committed May 12, 2019
1 parent 5dd5d6d commit 5c91590
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/Fields/EnumValues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ export class EnumValues extends React.PureComponent<EnumValuesProps> {
<div>
<FieldLabel>
{type === 'array' ? 'Items' : ''} {values.length === 1 ? 'Value' : 'Enum'}:
</FieldLabel>
</FieldLabel>{' '}
{values.map((value, idx) => (
<ExampleValue key={idx}>{JSON.stringify(value)} </ExampleValue>
<ExampleValue key={idx}>
{JSON.stringify(value)}
</ExampleValue>
))}
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion src/components/Fields/FieldDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export class FieldDetail extends React.PureComponent<FieldDetailProps> {
return (
<div>
<FieldLabel> {this.props.label} </FieldLabel>{' '}
<ExampleValue> {JSON.stringify(this.props.value)} </ExampleValue>
<ExampleValue>
{JSON.stringify(this.props.value)}
</ExampleValue>
</div>
);
}
Expand Down

0 comments on commit 5c91590

Please sign in to comment.