Settings
Discount product picker
The inline selector, backed by a modal, used everywhere a discount needs to specify which tiers, products, checkout links, or discount codes it applies to.
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.
Discount product picker
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 |
|---|---|---|---|
item* | ApplyItem | — | Undocumented — add TSDoc to the prop in the library. |
size | number | 32 | Square edge in px. 32 everywhere in the shipped flows. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/settings/DiscountProductPicker.tsx- Portability
- Copies across unchanged — only the utils import path moves.
- Variants
type: tier | product | checkout-link | discount- Notes
- Use it whenever a discount flow needs to gather a selection of applicable items; its search field is read-only and only opens the picker modal, since real search happens there. Quantity is shared across the whole selection rather than set per item, reflecting a "N units of any qualifying product" rule.