fix: enum list doesn't wrap

fixes #993
This commit is contained in:
Roman Hotsiy 2019-08-01 10:32:09 +03:00
parent aba45dbbe6
commit bfbb0c1787
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 2 additions and 3 deletions

View File

@ -69,7 +69,6 @@ export const ExampleValue = styled(FieldLabel)`
background-color: ${transparentize(0.95, theme.colors.text.primary)}; background-color: ${transparentize(0.95, theme.colors.text.primary)};
color: ${transparentize(0.1, theme.colors.text.primary)}; color: ${transparentize(0.1, theme.colors.text.primary)};
margin: ${theme.spacing.unit}px;
padding: 0 ${theme.spacing.unit}px; padding: 0 ${theme.spacing.unit}px;
border: 1px solid ${transparentize(0.9, theme.colors.text.primary)}; border: 1px solid ${transparentize(0.9, theme.colors.text.primary)};
font-family: ${theme.typography.code.fontFamily}; font-family: ${theme.typography.code.fontFamily};

View File

@ -23,12 +23,12 @@ export class EnumValues extends React.PureComponent<EnumValuesProps> {
<FieldLabel> <FieldLabel>
{type === 'array' ? l('enumArray') : ''}{' '} {type === 'array' ? l('enumArray') : ''}{' '}
{values.length === 1 ? l('enumSingleValue') : l('enum')}: {values.length === 1 ? l('enumSingleValue') : l('enum')}:
</FieldLabel> </FieldLabel>{' '}
{values.map((value, idx) => { {values.map((value, idx) => {
const exampleValue = enumSkipQuotes ? value : JSON.stringify(value); const exampleValue = enumSkipQuotes ? value : JSON.stringify(value);
return ( return (
<React.Fragment key={idx}> <React.Fragment key={idx}>
<ExampleValue>{exampleValue}</ExampleValue> <ExampleValue>{exampleValue}</ExampleValue>{' '}
</React.Fragment> </React.Fragment>
); );
})} })}