Skip to content

Commit

Permalink
Improve runtime docs, closes #1176 (#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
johno authored Jul 22, 2020
1 parent 033d7bc commit f12b1ee
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 460 deletions.
13 changes: 13 additions & 0 deletions packages/runtime/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ npm i -S @mdx-js/runtime

## Usage

### Props

The MDX Runtime component accepts two props:

| Name | Description |
| ------------ | ---------------------------------------------------------------- |
| `components` | Globally available components for the runtime |
| `scope` | Variables that are accessible in the JSX portion of the document |

### Example code

```jsx
import React from 'react'
import MDX from '@mdx-js/runtime'
Expand All @@ -40,6 +51,8 @@ const mdx = `
# Hello, world!
<Demo />
<div>Here is the scope variable: {some}</div>
`

export default () => (
Expand Down
Loading

1 comment on commit f12b1ee

@vercel
Copy link

@vercel vercel bot commented on f12b1ee Jul 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.