@udus/notion-renderer
Version:

7 lines (6 loc) • 578 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { RichText } from "../RichText/RichText.js";
import { BlockList } from "./BlockList.js";
export const Paragraph = ({ block }) => {
return (_jsxs("div", { id: block.id, className: `notion-block notion-paragraph notion-color-${block.paragraph.color}`, children: [_jsx("p", { children: _jsx(RichText, { richText: block.paragraph.rich_text }) }), block.paragraph.children && (_jsx("div", { className: "notion-paragraph-children", children: _jsx(BlockList, { blocks: block.paragraph.children }) }))] }));
};