import * as React from 'react'; import { ExampleValue, FieldLabel } from '../../common-elements/fields'; export interface EnumValuesProps { values: string[]; type: string; } export class EnumValues extends React.PureComponent { render() { const { values, type } = this.props; if (!values.length) { return null; } return (
{type === 'array' ? 'Items' : ''} {values.length === 1 ? 'Value' : 'Enum'}: {' '} {values.map((value, idx) => ( {JSON.stringify(value)} ))}
); } }