Commerce
Transaction detail header
The header bar for a transaction detail page, showing the transaction number, status badge, and the actions available for that status.
Available
Ports as-is
Examples
Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.
Transaction detail header
Rendered live from Storybook
Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.
Props
The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.
| Prop | Type | Default | Description |
|---|---|---|---|
transactionNumber* | string | — | Undocumented — add TSDoc to the prop in the library. |
status* | TransactionStatus | — | Undocumented — add TSDoc to the prop in the library. |
onRefund* | () => void | — | Refund pressed — from the desktop button or the mobile menu item. |
onBack | () => void | — | Back pressed. Supplied by the host, which owns the route. |
onCancelSubscription | () => void | — | Present ⇒ the destructive "Cancel subscription" item appears in the menu (unless `cancellationLabel` is already set). |
cancellationLabel | string | — | Already cancelled — renders as a neutral pill beside the status badge and suppresses the cancel menu item. e.g. `"Cancels Aug 12"`. |
onSendReceipt | () => void | — | "Send receipt" chosen. Omit and the item still renders but does nothing. |
onCopyTransactionId | (transactionNumber: string) => void | — | "Copy transaction ID" chosen. The component does not touch the clipboard — it hands the value over. |
defaultMenuOpen | boolean | false | Opens the actions menu on mount so the menu is a static story. |
menuOpen | boolean | — | Fully controlled menu state. Overrides `defaultMenuOpen`. |
onMenuOpenChange | (open: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/transactions/TransactionDetailHeader.tsx- Portability
- Copies across unchanged — only the utils import path moves.
- Notes
- Use at the top of a transaction detail view; the standalone Refund control (and its mobile menu equivalent) only appears when status is "succeeded," and the destructive Cancel subscription menu item is hidden once a cancellationLabel is set. Back, refund, and menu actions are all supplied by the host via callbacks rather than handled internally.