@udus/notion-renderer
Version:

8 lines (7 loc) • 715 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Icon } from "../Common/Icon.js";
import { RichText } from "../RichText/RichText.js";
import { BlockList } from "./BlockList.js";
export const Callout = ({ block }) => {
return (_jsxs("div", { id: block.id, className: `notion-block notion-callout notion-color-${block.callout.color}`, children: [_jsx("span", { className: "notion-callout-icon", children: _jsx(Icon, { icon: block.callout.icon }) }), _jsxs("div", { className: "notion-callout-content", children: [_jsx("span", { children: _jsx(RichText, { richText: block.callout.rich_text }) }), block.callout.children && (_jsx(BlockList, { blocks: block.callout.children }))] })] }));
};