blob: 16f5e3746a9b31793db8b82bce973cdf4cc8a6fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import React from 'react';
import ReactMarkdown from 'react-markdown';
import styled from 'styled-components'
import MarkdownCodeRenderer from './InlineCode'
const Content = styled.div`
max-width: 100%;
overflow-wrap: anywhere;
img {
max-width: 100%;
}
`
const Markdown = ({content}) => {
return <Content>
<ReactMarkdown
source={content}
linkTarget='_blank'
renderers={{
code: MarkdownCodeRenderer,
}}
/>
</Content>;
}
export default Markdown
|