aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Markdown/Image.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/Image.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/Image.tsx')
-rw-r--r--src/lib/Markdown/Image.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/Markdown/Image.tsx b/src/lib/Markdown/Image.tsx
new file mode 100644
index 0000000..472d6f0
--- /dev/null
+++ b/src/lib/Markdown/Image.tsx
@@ -0,0 +1,12 @@
+import React from 'react';
+
+interface PropTypes {
+ src: string;
+ alt: string;
+}
+
+const Image: React.FC<PropTypes> = ({ src, alt }) => {
+ return <img src={src} alt={alt} style={{ maxWidth: '100%', maxHeight: '100%' }} />;
+};
+
+export default Image;