Skip to content

Commerce

Transaction items card

Lists every line item a buyer paid for on a transaction detail page, showing a thumbnail, name, item-type pill, and unit price for each row.
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 items card

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.

PropTypeDefaultDescription
items*TransactionItem[]—Undocumented — add TSDoc to the prop in the library.
getItemHref(item: TransactionItem, index: number) => string | null—Destination for a row. Return `null` (or omit the prop) to render the row as a non-navigating button that only fires `onItemClick`. Replaces the app's `/creator/store/:productId?space=…` route construction, which needed both `react-router-dom` and the active-space search param.
onItemClick(item: TransactionItem, index: number) => void—A row was activated. Fires for both the anchor and the button branch.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/transactions/TransactionItemsCard.tsx
Portability
Copies across unchanged — only the utils import path moves.
Notes
Use it wherever a transaction's individual purchases need to be shown as a linkable list; pass getItemHref to make rows navigate to the source product, or omit it to render non-navigating buttons for a read-only context. Quantities above one append a "× n" suffix to the price, and long names truncate rather than pushing the type pill off the row.