mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 22:24:54 +03:00
Remove opacity, grab ExtensionValue from fields.ts
This commit is contained in:
parent
6f48090b53
commit
ed8dc62d32
|
@ -88,6 +88,8 @@ export const ExampleValue = styled(FieldLabel)`
|
||||||
${extensionsHook('ExampleValue')};
|
${extensionsHook('ExampleValue')};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const ExtensionValue = styled(ExampleValue)``;
|
||||||
|
|
||||||
export const ConstraintItem = styled(FieldLabel)`
|
export const ConstraintItem = styled(FieldLabel)`
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
${({ theme }) => `
|
${({ theme }) => `
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { FieldLabel } from '../../common-elements/fields';
|
import { FieldLabel, ExtensionValue } from '../../common-elements/fields';
|
||||||
|
|
||||||
import styled from '../../styled-components';
|
import styled from '../../styled-components';
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import { OptionsContext } from '../OptionsProvider';
|
||||||
import { StyledMarkdownBlock } from '../Markdown/styled.elements';
|
import { StyledMarkdownBlock } from '../Markdown/styled.elements';
|
||||||
|
|
||||||
const Extension = styled(StyledMarkdownBlock)`
|
const Extension = styled(StyledMarkdownBlock)`
|
||||||
opacity: 0.9;
|
|
||||||
margin: 2px 0;
|
margin: 2px 0;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
@ -28,10 +27,8 @@ export class Extensions extends React.PureComponent<ExtensionsProps> {
|
||||||
{options.showExtensions &&
|
{options.showExtensions &&
|
||||||
Object.keys(this.props.extensions).map(key => (
|
Object.keys(this.props.extensions).map(key => (
|
||||||
<Extension key={key}>
|
<Extension key={key}>
|
||||||
<FieldLabel>{key.substring(2)}:</FieldLabel>{' '}
|
<FieldLabel>{key.substring(2)}:</FieldLabel>
|
||||||
<code>
|
<ExtensionValue>{JSON.stringify(this.props.extensions[key]).replace(/(^")|("$)/g, '')}</ExtensionValue>
|
||||||
{JSON.stringify(this.props.extensions[key]).replace(/(^")|("$)/g, '')}
|
|
||||||
</code>
|
|
||||||
</Extension>
|
</Extension>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user