Merge branch 'master' into 14097-make-a-copy-process
[arvados-workbench2.git] / src / components / code-snippet / code-snippet.tsx
index bf9b6128859ac34d8a8425a916ae8d87e8875465..eb0e709a9b0dfa572860e15b796b436e065b41e3 100644 (file)
@@ -12,8 +12,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
         boxSizing: 'border-box',
         width: '100%',
-        height: '550px',
-        overflow: 'scroll',
+        height: 'auto',
+        maxHeight: '550px',
+        overflow: 'auto',
         padding: theme.spacing.unit
     }
 });
@@ -29,7 +30,7 @@ export const CodeSnippet = withStyles(styles)(
         <Typography component="div" className={classes.root}>
             {
                 lines.map((line: string, index: number) => {
-                    return <Typography key={index} component="div">{line}</Typography>;
+                    return <Typography key={index} component="pre">{line}</Typography>;
                 })
             }
         </Typography>