A policy or terms document: summary, numbered sections, and what has changed.
history is the reason this component exists rather than a page of prose. A policy that silently changes is one somebody agreed to under different terms, so the revisions are part of the document and not a changelog somewhere else. "Last changed" and "In force from" are separate fields for the same reason: the gap between them is when a reader can still object.
The default labels are plain words - "Last changed", "In force from", "What has changed" - because a document nobody can read has consent in name only.
Section numbers are rendered, not typed into the titles, so they cannot drift out of order.
import { LegalDoc } from '@redrob-labs/ui';
| Prop | Type | Notes |
|---|---|---|
title |
React.ReactNode |
|
entity |
React.ReactNode |
The legal entity bound by this. |
updated |
React.ReactNode |
|
updatedLabel |
string |
|
effective |
React.ReactNode |
|
effectiveLabel |
string |
|
summary |
React.ReactNode |
The document in a few sentences, above the document. |
sections |
LegalSection[] |
|
contentsLabel |
string |
|
history |
LegalRevision[] |
Past revisions, newest first. |
historyLabel |
React.ReactNode |
|
contact |
React.ReactNode |
|
className |
string |