import * as React from 'react'; import { ExtensionValue, FieldLabel } from '../../common-elements/fields'; import styled from '../../styled-components'; import { OptionsContext } from '../OptionsProvider'; import { StyledMarkdownBlock } from '../Markdown/styled.elements'; const Extension = styled(StyledMarkdownBlock)` margin: 2px 0; `; export interface ExtensionsProps { extensions: { [k: string]: any; }; } export class Extensions extends React.PureComponent { render() { const exts = this.props.extensions; return ( {options => ( <> {options.showExtensions && Object.keys(exts).map(key => ( {key.substring(2)}: {' '} {typeof exts[key] === 'string' ? exts[key] : JSON.stringify(exts[key])} ))} )} ); } }