UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

19 lines (18 loc) 603 B
// biome-ignore lint: React is used for JSX import * as React from 'react'; import { CommonSliceType } from '../../../json-crdt-extensions'; import { Blockquote } from './Blockquote'; export const RenderBlock = (props) => { const { block, children } = props; const tag = block.tag(); switch (tag) { case '': return children; case CommonSliceType.blockquote: { return React.createElement(Blockquote, { ...props }); } default: { return React.createElement("p", { style: { padding: '16px 0' } }, children); } } };