Commerce
Membership allocation modal
MembershipAllocationModal — exported from the library at `src/components/checkout/MembershipAllocationModal.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.
Membership allocation modal
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 |
|---|---|---|---|
products* | CheckoutLineItem[] | — | What was bought. Each unit of each item becomes one seat row. |
spaceName* | string | — | Undocumented — add TSDoc to the prop in the library. |
onClose* | (summary: MembershipAllocationSummary) => void | — | Fires when the buyer sends. The app waited 700ms first; the timer is gone. |
open | boolean | true | Renders nothing when false. The page mounted this conditionally. |
members | CheckoutAssigneeCandidate[] | [] | Members the assignee field can search. Defaults to the prototype directory; pass `[]` to see the "type a full email" empty state. |
selfLabel | string | "You" | How the seat pinned to the buyer reads. |
selfAvatarSrc | string | "" | Avatar for that seat. Must be a `data:` URI or bundled asset. |
sent | boolean | — | Pins the CTA into its sent state. The app flipped this itself and then closed on a timer, which no static story could catch. |
defaultOpenAssigneeRow | number | — | Index of the seat row whose predictive menu is open on first render. |
defaultAssigneeQuery | string | "" | Seeds that row's query, so the menu shows real matches on mount. |
lockBodyScroll | boolean | false | Sets `document.body.style.overflow = "hidden"` while mounted. Off by default: a story should not freeze the docs page around it. |
disablePortal | boolean | false | Render in place instead of portalling to `document.body`. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/checkout/MembershipAllocationModal.tsx- Portability
- Copies across unchanged — only the utils import path moves.