X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/340b992768b4460ef27b1102f7065381be96f2ea..38fecec459a6ed195c771540bab9367835f968c8:/src/components/code-snippet/code-snippet.tsx diff --git a/src/components/code-snippet/code-snippet.tsx b/src/components/code-snippet/code-snippet.tsx index a23a5fe2..f0a2b213 100644 --- a/src/components/code-snippet/code-snippet.tsx +++ b/src/components/code-snippet/code-snippet.tsx @@ -2,36 +2,40 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { StyleRulesCallback, WithStyles, Typography, withStyles } from '@material-ui/core'; -import { ArvadosTheme } from '~/common/custom-theme'; -import * as classNames from 'classnames'; +import { ArvadosTheme } from 'common/custom-theme'; +import classNames from 'classnames'; -type CssRules = 'root'; +type CssRules = 'root' | 'space'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { boxSizing: 'border-box', overflow: 'auto', padding: theme.spacing.unit + }, + space: { + marginLeft: '15px' } }); export interface CodeSnippetDataProps { lines: string[]; className?: string; + apiResponse?: boolean; } type CodeSnippetProps = CodeSnippetDataProps & WithStyles; export const CodeSnippet = withStyles(styles)( - ({ classes, lines, className }: CodeSnippetProps) => - + { lines.map((line: string, index: number) => { - return {line}; + return {line}; }) }