X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a56225865734e581714833201bd1448ba34e0e9d..59100a72caedbc8f3c9872de1153bf3d4129122a:/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 b622210f..6cba299f 100644 --- a/src/components/code-snippet/code-snippet.tsx +++ b/src/components/code-snippet/code-snippet.tsx @@ -5,29 +5,30 @@ import * as React from 'react'; import { StyleRulesCallback, WithStyles, Typography, withStyles, Theme } from '@material-ui/core'; import { ArvadosTheme } from '~/common/custom-theme'; +import * as classNames from 'classnames'; type CssRules = 'root'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { boxSizing: 'border-box', - width: '100%', - height: 'auto', - maxHeight: '550px', - overflow: 'scroll', + overflow: 'auto', padding: theme.spacing.unit } }); export interface CodeSnippetDataProps { lines: string[]; + className?: string; } type CodeSnippetProps = CodeSnippetDataProps & WithStyles; export const CodeSnippet = withStyles(styles)( - ({ classes, lines }: CodeSnippetProps) => - + ({ classes, lines, className }: CodeSnippetProps) => + { lines.map((line: string, index: number) => { return {line};