0.0.2 • Published 6 years ago

mdx-jsx v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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