aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-04-05 21:10:50 +0300
committereug-vs <eug-vs@keemail.me>2020-04-05 21:10:50 +0300
commit1f67a4e15b9ab10f8ecba2ee93e6a4c44e3c71ec (patch)
tree6544bf0877092276ea7889869191286c154c36f6 /src/lib
parentb6e58c0f8eebb0447e5330b983ec387dbf2a59c0 (diff)
downloadreact-benzin-1f67a4e15b9ab10f8ecba2ee93e6a4c44e3c71ec.tar.gz
fix: use <pre> in CodeBlock
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Markdown/CodeBlock.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Markdown/CodeBlock.tsx b/src/lib/Markdown/CodeBlock.tsx
index c4478eb..5b8edec 100644
--- a/src/lib/Markdown/CodeBlock.tsx
+++ b/src/lib/Markdown/CodeBlock.tsx
@@ -7,9 +7,10 @@ import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles(theme => ({
root: {
background: theme.palette.background.default,
- padding: theme.spacing(2),
+ padding: theme.spacing(1),
overflowX: 'auto',
fontFamily: 'Monospace',
+ scrollbarColor: 'auto'
},
}));
@@ -17,7 +18,7 @@ const CodeBlock: React.FC<ParserPropTypes> = ({ rawLines }) => {
const classes = useStyles();
return (
<Paper variant="outlined" className={classes.root}>
- {rawLines.map(line => <> {line} <br/> </>)}
+ {rawLines.map(line => <pre>{line}</pre>)}
</Paper>
);
}