Skip to content

Commerce

Checkout links table

CheckoutLinksTable — exported from the library at `src/components/checkout-links/CheckoutLinksTable.tsx`. Awaiting a written description.
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.

Checkout links table

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
links*CheckoutLink[]—Undocumented — add TSDoc to the prop in the library.
selectionModebooleanfalseReveals the checkbox column and the floating bulk-actions toolbar.
onExitSelectionMode() => void—Cancel or Escape was pressed in selection mode.
onDelete(ids: string[]) => void—Delete was confirmed, for one id or for the whole selection.
onSelectLink(link: CheckoutLink) => void—A row was activated (click or Enter/Space). Replaces `navigate(href)`.
onEditLink(link: CheckoutLink) => void—Edit was chosen from a row's overflow menu.
onPreviewLink(link: CheckoutLink) => void—Preview was chosen. The app serialised the whole link into a query string and `window.open`ed a preview route — see the promotion note.
onExport(ids: string[]) => void—Export was pressed in the bulk toolbar. The app's handler was an empty stub.
getHref(link: CheckoutLink) => string—Row href, used by the "View link" menu item. Defaults to `/creator/apps/checkout-links/{id}`.
spaceIdstring—Appended as `?space=` to the default href. Replaces the router's search param.
defaultSelectedIdsstring[]—Uncontrolled initial selection, so "3 selected" is a static story.
selectedIdsstring[]—Controlled selection.
onSelectionChange(ids: string[]) => void—Undocumented — add TSDoc to the prop in the library.
defaultPagenumber0Uncontrolled initial page index (zero-based).
pageSizenumber20Rows per page.
defaultDeleteTargetCheckoutLinksTableDeleteTarget | nullnullUncontrolled seed for the delete confirmation, so the open dialog is a static story. `"bulk"` targets the current selection.
currencySymbolstring"$"Prefix on prices. BTS prices in AUD, hence the bare `$`.
emptyCartPriceLabelstring"-"Price cell for a dynamic (empty-cart) link, which has no single price.
emptyLabelstring"No links found"Shown when `links` is empty.
classNamestring—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/checkout-links/CheckoutLinksTable.tsx
Portability
Copies across unchanged — only the utils import path moves.