UNPKG

@udus/notion-renderer

Version:
7 lines (6 loc) 609 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { RichText } from "../../RichText/RichText.js"; import { BlockList } from "../BlockList.js"; export const OpenedToggle = ({ block }) => { return (_jsxs("details", { id: block.id, className: `notion-toggle notion-color-${block.toggle.color}`, open: true, children: [_jsx("summary", { className: "notion-toggle-summary", children: _jsx(RichText, { richText: block.toggle.rich_text }) }), _jsx("div", { className: "notion-toggle-details", children: block.toggle.children && _jsx(BlockList, { blocks: block.toggle.children }) })] })); };