// @flow import React from 'react'; import Code from './components/Code'; import BlockToolbar from './components/Toolbar/BlockToolbar'; import HorizontalRule from './components/HorizontalRule'; import Image from './components/Image'; import Link from './components/Link'; import ListItem from './components/ListItem'; import TodoList from './components/TodoList'; import { Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, } from './components/Heading'; import Paragraph from './components/Paragraph'; import type { SlateNodeProps } from './types'; type Options = { onInsertImage: *, }; export default function createRenderNode({ onInsertImage }: Options) { return function renderNode(props: SlateNodeProps) { const { attributes } = props; switch (props.node.type) { case 'paragraph': return ; case 'block-toolbar': return ; case 'block-quote': return
{props.children}
; case 'bulleted-list': return ; case 'ordered-list': return
    {props.children}
; case 'todo-list': return {props.children}; case 'table': return {props.children}
; case 'table-row': return {props.children}; case 'table-head': return {props.children}; case 'table-cell': return {props.children}; case 'list-item': return ; case 'horizontal-rule': return ; case 'code': return ; case 'code-line': return
{props.children}
; case 'image': return ; case 'link': return ; case 'heading1': return ; case 'heading2': return ; case 'heading3': return ; case 'heading4': return ; case 'heading5': return ; case 'heading6': return ; default: } }; }