From 62a543258a111f0f45be74b6ec3d887e15f67376 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sun, 5 Apr 2020 14:18:45 +0300
Subject: feat: beautify CodeBlock

---
 src/lib/Markdown/CodeBlock.tsx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'src/lib/Markdown/CodeBlock.tsx')

diff --git a/src/lib/Markdown/CodeBlock.tsx b/src/lib/Markdown/CodeBlock.tsx
index 2718647..cbb3078 100644
--- a/src/lib/Markdown/CodeBlock.tsx
+++ b/src/lib/Markdown/CodeBlock.tsx
@@ -1,11 +1,23 @@
 import React from 'react';
 import { ParserPropTypes } from './types';
+import { Paper } from '@material-ui/core';
+
+import { makeStyles } from '@material-ui/core/styles';
+
+const useStyles = makeStyles(theme => ({
+  root: {
+    background: theme.palette.background.default,
+    padding: theme.spacing(2),
+    overflowX: 'auto',
+  },
+}));
 
 const CodeBlock: React.FC<ParserPropTypes> = ({ rawLines }) => {
+  const classes = useStyles();
   return (
-    <p style={{background: 'rgba(255, 255, 255, .1)', padding: '8px' }}>
+    <Paper variant="outlined" className={classes.root}>
       {rawLines.map(line => <> {line} <br/> </>)}
-    </p>
+    </Paper>
   );
 }
 
-- 
cgit v1.2.3

