diff options
author | eug-vs <eug-vs@keemail.me> | 2020-04-05 21:10:50 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-04-05 21:10:50 +0300 |
commit | 1f67a4e15b9ab10f8ecba2ee93e6a4c44e3c71ec (patch) | |
tree | 6544bf0877092276ea7889869191286c154c36f6 /src/lib/Markdown | |
parent | b6e58c0f8eebb0447e5330b983ec387dbf2a59c0 (diff) | |
download | react-benzin-1f67a4e15b9ab10f8ecba2ee93e6a4c44e3c71ec.tar.gz |
fix: use <pre> in CodeBlock
Diffstat (limited to 'src/lib/Markdown')
-rw-r--r-- | src/lib/Markdown/CodeBlock.tsx | 5 |
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> ); } |