idyll-document
v4.0.0-alpha.4
Published
The Idyll runtime, implemented as a React component.
Downloads
461
Readme
idyll-document
The Idyll runtime, implemented as a React component.
Install
npm install --save idyll-document
Usage
import * as components from 'idyll-components'
<IdyllDocument markup={`# Hello World`} components={components} />
Options
<IdyllDocument
ast={
ast
} /* optional, if you want to pass in a precompiled abstract syntax tree instead of markup */
components={
components
} /* Map of components that may be referenced in markup */
context={
context
} /* Add custom context hooks (see https://idyll-lang.org/docs/advanced-configuration) for more info */
datasets={datasets} /* Map of datasets that may be referenced in markup */
layout={layout} /* Which layout to use? e.g. "blog", "centered" */
markup={markup} /* String of Idyll markup. Must provide either this OR ast */
theme={theme} /* Which theme to use? e.g. "github" */
/>