aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Markdown/InlineCode.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-01-07 13:22:21 +0300
committereug-vs <eug-vs@keemail.me>2021-01-07 15:17:43 +0300
commitf5c21698a09d9214f57ce6dab2595f3d61e1ff11 (patch)
tree900b605f147a5a024377b42be16a6f677a10a387 /src/lib/Markdown/InlineCode.tsx
parentafa7e4abe02959798665949193d832907d97153a (diff)
downloadreact-benzin-f5c21698a09d9214f57ce6dab2595f3d61e1ff11.tar.gz
feat!: use react-markdown
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;