mdx-jsx

0.0.2 • Public • Published

mdx-jsx

Turn MDX into a pretty JSX string.

Usage

const toJSX = require('mdx-jsx')
 
const mdx = `
# Hello mdx-jsx
 
<Button>
  Beep
</Button>
`
 
const jsx = toJSX(mdx, {
  components: {
    h1: 'Heading'
  }
})

Options

  • components (object) component names to be used for each markdown element

CLI

mdx-jsx docs/hello.mdx --out-dir dist

Package Sidebar

Install

npm i mdx-jsx

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

7.01 kB

Total Files

6

Last publish

Collaborators

  • johno