minista-markdown
v0.2.0
Published
React component to easily convert Markdown to HTML in minista
Downloads
1
Maintainers
Readme
minista markdown
About
minista 内の Markdown を簡単に HTML へ変換する React コンポーネント。
Include
- remark-gfm
- rehype-highlight
- rehype-react
How To Use
npm
$ npm install --save-dev minista-markdown
import { Markdown } from "minista-markdown"
const markdownText = `# test`
const H1Red = (props: any) => {
return <h1 style={{ color: "red" }} {...props} />
}
const components = {
h1: H1Red,
}
export const PageMarkdown = () => {
return <Markdown content={markdownText} components={components} />
}
export default PageMarkdown
// => <h1 style="color:red">test</h1>
License
- MIT