Store editor
Product details section
Detail fields whose labels change by product kind.
Available
Needs mock props
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.
Product details section
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 |
|---|---|---|---|
productType* | ProductKindType | — | Undocumented — add TSDoc to the prop in the library. |
promoImages* | string[] | — | Promo image sources — data URIs or absolute URLs. |
onPromoImagesChange* | (images: string[]) => void | — | Undocumented — add TSDoc to the prop in the library. |
title* | string | — | Undocumented — add TSDoc to the prop in the library. |
onTitleChange* | (title: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
briefDescription* | string | — | Undocumented — add TSDoc to the prop in the library. |
onBriefDescriptionChange* | (desc: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
pricingModel* | PricingModel | — | Undocumented — add TSDoc to the prop in the library. |
onPricingModelChange* | (model: PricingModel) => void | — | Undocumented — add TSDoc to the prop in the library. |
price* | string | — | Bare amount as typed — no currency symbol, no formatting. |
onPriceChange* | (price: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
recurringInterval* | RecurringInterval | — | Undocumented — add TSDoc to the prop in the library. |
onRecurringIntervalChange* | (interval: RecurringInterval) => void | — | Undocumented — add TSDoc to the prop in the library. |
includedTierId | string | — | Undocumented — add TSDoc to the prop in the library. |
onIncludedTierIdChange | (tierId: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
tiers | TierOption[] | [] | Access tiers offered by "Included in tier". The app read these from its access-tiers context; here the caller supplies them. Free tiers are filtered out downstream — a product cannot be "included" in a tier nobody pays for. |
currencySymbol | string | "$" | Currency symbol prefixed to the price field. BTS bills in AUD. |
mediaOnly | boolean | — | Show only the media upload section. |
detailsOnly | boolean | — | Show only title, description, and pricing. |
selectedIndex | number | — | Which thumbnail is showing in the big 3:4 frame (`mediaOnly`). Leave undefined to let the section manage it; lift it to snapshot a selection. |
initialSelectedIndex | number | 0 | Initial selection when uncontrolled. |
onSelectedIndexChange | (index: number) => void | — | Undocumented — add TSDoc to the prop in the library. |
forceDropTarget | PromoDropTarget | — | Forces the drag-reorder insertion bar to a position. The app only ever showed it mid-drag, which no static story can reach — this makes the affordance reviewable. |
toPromoImageValue | (file: File, index: number) => string | () => PLACEHOLDER_PROMO_IMAGE | Turns a picked promo file into the string held in `promoImages`. The app base64-encoded each file with a `FileReader`; the default here resolves to `PLACEHOLDER_PROMO_IMAGE`, which keeps the component synchronous and side-effect free. |
onPromoFilesSelected | (files: File[]) => void | — | Fires with the raw picks as well, for a host that wants to upload for real. |
defaultOpenControl | ProductDetailsOpenControl | — | Opens one of the pricing dropdowns on mount so each menu is a static story. Not used by the app. |
className | string | — | 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/store/editor/sections/ProductDetailsSection.tsx- Portability
- Needs its app dependencies replaced by props before it renders in isolation.