UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

11 lines (10 loc) 727 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Prose } from "../block/Prose.js"; import { Title } from "../block/Title.js"; import { Markup } from "../misc/Markup.js"; import { Page } from "../page/Page.js"; import { TreeCards } from "../tree/TreeCards.js"; /** Page renderer for a `tree-file` element — shows title, content, and child code symbols. */ export function FilePage({ path, title, name, description, content, children }) { return (_jsxs(Page, { title: title ?? name, description: description, children: [_jsx(Title, { children: title ?? name }), content && (_jsx(Prose, { children: _jsx(Markup, { children: content }) })), _jsx(TreeCards, { path: path, children: children })] })); }