HistoryReview API
Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.
HistoryReview8 props3 callbacks0 methods
Preset and CSS
Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.
CSS parts in the example [data-part="author"] [data-part="comparison"] [data-part="comparison-control"] [data-part="comparison-label"] [data-part="root"] [data-part="versions"] [data-part="versions-label"]
Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.
Props8
| Name | Type | Description |
|---|---|---|
labelRequired | string | Accessible title for the review. |
versionsRequired |
| Versions in newest-first order. |
currentIdOptional | string | undefined | Current version ID. Defaults to the first version. |
valueOptional | string | undefined | Controlled ID of the version being inspected. |
openOptional | boolean | undefined | Omit for inline rendering or control modal visibility with a boolean. |
labelsRequired |
| Localized review, comparison and restore strings. |
presetOptional |
| Optional presentation preset. |
classNameOptional | string | undefined | Additional root classes. |
Events and callbacks3
| Name | Type | Description |
|---|---|---|
onValueChangeOptional |
| Reports a selected version ID. |
onCloseOptional |
| Reports that the modal should close. |
onRestoreOptional |
| Runs after confirming a restore. The host persists the resulting version. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.