@udus/notion-renderer
Version:

7 lines (6 loc) • 959 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { RichText } from "../RichText/RichText.js";
import { BlockList } from "./BlockList.js";
export const Heading3 = ({ block }) => {
return (_jsx(_Fragment, { children: block.heading_3.is_toggleable ? (_jsxs("details", { id: block.id, className: `notion-block notion-heading notion-heading-3 notion-toggle notion-color-${block.heading_3.color}`, children: [_jsx("summary", { className: "notion-toggle-summary", children: _jsx("h3", { children: _jsx(RichText, { richText: block.heading_3.rich_text }) }) }), _jsx("div", { className: "notion-toggle-details", children: block.heading_3.children && (_jsx(BlockList, { blocks: block.heading_3.children })) })] })) : (_jsx("h3", { id: block.id, className: `notion-block notion-heading notion-heading-3 notion-color-${block.heading_3.color}`, children: _jsx(RichText, { richText: block.heading_3.rich_text }) })) }));
};