16070: Replace process command dialog with command card
[arvados-workbench2.git] / src / components / code-snippet / code-snippet.tsx
index fd44b5fc5e6f69ece2fe238b102c394a3749287f..f156e3e8e6e7ad26258662617f6ce3aafd60b960 100644 (file)
@@ -24,24 +24,17 @@ export interface CodeSnippetDataProps {
     lines: string[];
     className?: string;
     apiResponse?: boolean;
-    containerClassName?: string;
-    fontSize?: number;
-    customRenderer?: (line: string) => React.ReactNode;
 }
 
 type CodeSnippetProps = CodeSnippetDataProps & WithStyles<CssRules>;
 
 export const CodeSnippet = withStyles(styles)(
-    ({ classes, lines, className, containerClassName,
-        apiResponse, fontSize, customRenderer }: CodeSnippetProps) =>
-        <Typography component="div"
-            className={classNames(classes.root, containerClassName, className)}>
-            { lines.map((line: string, index: number) => {
-            return <Typography key={index} style={{ fontSize: fontSize }}
-                className={apiResponse ? classes.space : className}
-                component="pre">
-                {customRenderer ? customRenderer(line) : line}
-            </Typography>;
-            }) }
+    ({ classes, lines, className, apiResponse }: CodeSnippetProps) =>
+        <Typography
+        component="div"
+        className={classNames(classes.root, className)}>
+            <Typography className={apiResponse ? classes.space : className} component="pre">
+                {lines.join('\n')}
+            </Typography>
         </Typography>
-    );
\ No newline at end of file
+    );