@railsware/outline-checklist
v0.1.12
Published
A React component for Outliner editor.
Downloads
15
Readme
A React component for Outliner editor.
Usage
Example:
import React, { useState } from 'react'
import Document from '@railsware/outline-checklist'
const MyComponent = ({ outlineDocument }) => {
const [document, setDocument] = useState()
const onChange = (updatedDocument) => {
setDocument(updatedDocument)
}
return <Document document={document} onChange={onChange} />
}
Props
| Name | Type | Description | Required | Default | |-----------------|-------------------------|-------------------------------------------------------------|-----------|----------------------------| | document | object | Document tree to render | true | | | onChange | function | Passes document state when change is made | true | |