diff --git a/packages/runtime/readme.md b/packages/runtime/readme.md index 7616ad3d3..d7e239a72 100644 --- a/packages/runtime/readme.md +++ b/packages/runtime/readme.md @@ -25,14 +25,25 @@ npm i -S @mdx-js/runtime import React from 'react' import MDX from '@mdx-js/runtime' +// Provide custom components for markdown elements const components = { h1: props =>

} -const mdx = '# Hello, world!' +// Provide custom components that will be referenced as JSX +// in the markdown string +const scope = { + Demo: props =>

This is a demo component

+} + +const mdx = ' +# Hello, world! + + +' export default () => ( - {mdx} + {mdx} ) ```