It would be nice to have a markdown component to replace our use of the markdown-body class. We might be able to hack this with:
const markdownCSS = sass`@import "primer-markdown/index.scss";`
const Markdown = ({className, ...rest}) => (
<div className={classnames('markdown-body', className)} {...rest} />
)
export withSystemProps(styled(Markdown)`${markdownCSS}`, COMMON)
Ideally, though, we'd port the CSS over. To support MDX, we could take a slightly different tack:
import {MDXProvider} from '@mdx-js/tag'
const components = {
a: Link,
h1: props => <Heading is='h1' fontSize={6} {...props} />,
// etc.
}
const MarkdownProvider = props => (
<MDXProvider components={components} {...props} />
)
export withSystemProps(MarkdownProvider, COMMON)
It would be nice to have a markdown component to replace our use of the
markdown-bodyclass. We might be able to hack this with:Ideally, though, we'd port the CSS over. To support MDX, we could take a slightly different tack: