From 62a543258a111f0f45be74b6ec3d887e15f67376 Mon Sep 17 00:00:00 2001 From: eug-vs 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') 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 = ({ rawLines }) => { + const classes = useStyles(); return ( -

+ {rawLines.map(line => <> {line}
)} -

+ ); } -- cgit v1.2.3