json-joy
Version:
Collection of libraries for building collaborative editing apps.
17 lines (16 loc) • 541 B
JavaScript
// biome-ignore lint: React is used for JSX
import * as React from 'react';
import { CommonSliceType } from '../../../json-crdt-extensions';
export const RenderBlock = ({ block, children }) => {
const tag = block.tag();
switch (tag) {
case '':
return children;
case CommonSliceType.blockquote: {
return React.createElement("blockquote", null, children);
}
default: {
return React.createElement("div", { style: { padding: '16px 0' } }, children);
}
}
};