aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Markdown/InlineCode.tsx
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2021-01-11 22:15:33 +0200
committerGitHub <noreply@github.com>2021-01-11 22:15:33 +0200
commit5f72950c56ea8853b41b64a092a2e98dbf53cf3f (patch)
tree240101bb69aea59c72e1e6fa328b9c5e1729f367 /src/lib/Markdown/InlineCode.tsx
parentbc288a43c90ab830019bf077d72081fade76c06e (diff)
parentaa4493b08baae2d41a4c4346b9a5c63b08df471e (diff)
downloadreact-benzin-5f72950c56ea8853b41b64a092a2e98dbf53cf3f.tar.gz
Merge pull request #20 from eug-vs/feat/react-markdown
Feat: use react-markdown library and support context
Diffstat (limited to 'src/lib/Markdown/InlineCode.tsx')
-rw-r--r--src/lib/Markdown/InlineCode.tsx18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/Markdown/InlineCode.tsx b/src/lib/Markdown/InlineCode.tsx
new file mode 100644
index 0000000..c51f924
--- /dev/null
+++ b/src/lib/Markdown/InlineCode.tsx
@@ -0,0 +1,18 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/core';
+
+const useStyles = makeStyles(theme => ({
+ root: {
+ background: theme.palette.background.default,
+ borderRadius: theme.spacing(0.5),
+ padding: theme.spacing(0.5),
+ fontFamily: 'Monospace',
+ },
+}));
+
+const InlineCode: React.FC = ({ children }) => {
+ const classes = useStyles();
+ return <span className={classes.root}>{children}</span>;
+};
+
+export default InlineCode;