diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2021-01-14 19:27:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 19:27:47 +0200 |
commit | e1d1bb966cca5e1541d5703505cfa83e6ae12ec0 (patch) | |
tree | d803e0e891fc6c14ff2a390beeabbe59d0ad8485 /src/lib/Markdown/CodeBlock.tsx | |
parent | d23df805ed5d0e78c604d5c9f81f21bbc6a06288 (diff) | |
parent | ef9dfdacf17c62254331140a40a508549aa725b4 (diff) | |
download | react-benzin-master.tar.gz |
Release 4.1.0
Diffstat (limited to 'src/lib/Markdown/CodeBlock.tsx')
-rw-r--r-- | src/lib/Markdown/CodeBlock.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/Markdown/CodeBlock.tsx b/src/lib/Markdown/CodeBlock.tsx index 394458e..7431881 100644 --- a/src/lib/Markdown/CodeBlock.tsx +++ b/src/lib/Markdown/CodeBlock.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import { Paper } from '@material-ui/core'; +import { Paper, makeStyles } from '@material-ui/core'; -import { makeStyles } from '@material-ui/core/styles'; -import { ParserPropTypes } from './types'; +interface PropTypes { + value: string; +} const useStyles = makeStyles(theme => ({ root: { @@ -14,11 +15,13 @@ const useStyles = makeStyles(theme => ({ }, })); -const CodeBlock: React.FC<ParserPropTypes> = ({ rawLines }) => { +const CodeBlock: React.FC<PropTypes> = ({ value }) => { const classes = useStyles(); return ( <Paper variant="outlined" className={classes.root}> - {rawLines.map(line => <pre>{line}</pre>)} + <pre> + {value} + </pre> </Paper> ); }; |