Component docs
Loading
"use client";
import { ToolHistoryPanel } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
model (required) | ToolHistoryModel<TSnapshot> | — | — |
labels | Partial<ToolHistoryLabels> | — | Text overrides (defaults from the toolHistoryPanel catalog). |
modelrequiredToolHistoryModel<TSnapshot>
labelsPartial<ToolHistoryLabels>
Text overrides (defaults from the toolHistoryPanel catalog).
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
<ToolHistoryPanel
labels={{ noHistory: "No history", redo: "Redo", undo: "Undo" }}
model={{
canRedo: false,
canUndo: true,
entries: [{ id: "current", label: "Edited", state: "current" }],
onJumpTo: (id) => console.log(id),
onRedo: () => undefined,
onUndo: () => undefined,
}}
/>