X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/1534032e710b57106297576edb28e84b652a76f0..e5551bf01ddaff04ca0494013b7bab1a0978f7d1:/src/components/code-snippet/code-snippet.tsx?ds=sidebyside diff --git a/src/components/code-snippet/code-snippet.tsx b/src/components/code-snippet/code-snippet.tsx index 6cba299f..84271f0e 100644 --- a/src/components/code-snippet/code-snippet.tsx +++ b/src/components/code-snippet/code-snippet.tsx @@ -3,35 +3,39 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { StyleRulesCallback, WithStyles, Typography, withStyles, Theme } from '@material-ui/core'; +import { StyleRulesCallback, WithStyles, Typography, withStyles } from '@material-ui/core'; import { ArvadosTheme } from '~/common/custom-theme'; import * as 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) => + ({ classes, lines, className, apiResponse }: CodeSnippetProps) => { lines.map((line: string, index: number) => { - return {line}; + return {line}; }) }