npm.io
2.0.0 • Published 1 year ago

@mdx-js/runtime

Licence
Version
2.0.0
Deps
0
Size
642 B
Vulns
0
Weekly
0
Stars
19.8K
DeprecatedThis package is deprecated

@mdx-js/runtime

Deprecated: this package is no longer maintained.

You can use @mdx-js/mdx itself to compile and run:

import {evaluate} from '@mdx-js/mdx'
import * as runtime from 'react/jsx-runtime'

const components = {
  h1: props => <h1 style={{color: 'tomato'}} {...props} />
}

const document = `
# Hello, world!
`

const {default: Content} = await evaluate(document, runtime)

console.log(<Content components={components} />)