Kaizen
Browse modulesReportsFunctions

Function: Document()

function Document(__namedParameters: {
  children?: Children;
  theme?: Theme;
}): RootNode;

Defined in: server/reports/components/document.ts:29

Root wrapper for every report template. Returns a RootNode holding the document's pages and optional theme.

Required setup: name each template *.report.tsx and declare the JSX runtime pragma at the top of the file:

/** @jsxImportSource @the-kaizen-labs/taproot/reports */

Linting: because report files use a non-DOM JSX runtime, react / react-hooks / jsx-a11y rules fire inappropriately on them. oxlint (which taproot uses) leaves those plugins off by default, so naming templates *.report.tsx is enough. If your repo enables them, scope them off the *.report.{tsx,jsx} glob. See the reports package README for details.

Parameters

ParameterType
__namedParameters{ children?: Children; theme?: Theme; }
__namedParameters.children?Children
__namedParameters.theme?Theme

Returns

RootNode

On this page