import React from "react"; import * as std from "../../law/std"; import { assertNever } from "../../util"; import type { HTMLComponentProps } from "../common/html"; import { elProps, wrapHTMLComponent } from "../common/html"; import { DOCXSentenceChildrenRun, HTMLSentenceChildrenRun } from "./sentenceChildrenRun"; import type { DOCXComponentProps } from "../common/docx/component"; import { wrapDOCXComponent } from "../common/docx/component"; import { w } from "../common/docx/tags"; import { DOCXParagraphItem, HTMLParagraphItem } from "./paragraphItem"; import { withKey } from "../common"; export interface RemarksProps { el: std.Remarks, indent: number, } export const HTMLRemarksCSS = /*css*/` .remarks { clear: both; } .remarks-label { clear: both; font-weight: bold; } `; export const HTMLRemarks = wrapHTMLComponent("HTMLRemarks", ((props: HTMLComponentProps & RemarksProps) => { const { el, htmlOptions, indent } = props; const blocks: React.JSX.Element[] = []; const RemarksLabel = el.children.find(std.isRemarksLabel); if (RemarksLabel) { blocks.push((