@udus/notion-renderer
Version:

8 lines (7 loc) • 615 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Icon } from "../Common/Icon.js";
import { useMapper } from "../hooks.js";
export const ChildPage = ({ block }) => {
const { Link } = useMapper();
return (_jsx("div", { id: block.id, className: "notion-block notion-child-page", children: _jsxs(Link, { prefix: "/", link: block.id, children: [_jsx("span", { className: "notion-child-page-icon", children: _jsx(Icon, { icon: block.child_page.page?.icon ?? null }) }), _jsx("span", { className: "notion-child-page-title", children: block.child_page.title || "Unknown page" })] }) }));
};