Store editor
Advanced section
Expiry and the less common settings.
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.
Advanced 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 | — | Decides which of the six optional fields render. |
visibility* | ProductVisibility | — | Undocumented — add TSDoc to the prop in the library. |
onVisibilityChange* | (visibility: ProductVisibility) => void | — | Undocumented — add TSDoc to the prop in the library. |
purchaseLimit* | string | — | Max units one buyer may purchase. Empty string means unlimited. |
onPurchaseLimitChange* | (limit: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
expiryDays* | string | — | Access window as a bare number, counted in `expiryUnit`. Empty means lifetime. |
onExpiryDaysChange* | (days: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
expiryUnit | ExpiryUnit | "days" | Unit for `expiryDays`. The app left this `Select` uncontrolled with `defaultValue="days"`, so the chosen unit never reached the form. It is a real prop here, which also makes each unit a static story. |
onExpiryUnitChange | (unit: ExpiryUnit) => void | — | Undocumented — add TSDoc to the prop in the library. |
seats* | string | — | Event seat cap. Empty string means unlimited. |
onSeatsChange* | (seats: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
depositAmount* | string | — | Service deposit taken at booking. Bare amount, no symbol. |
onDepositAmountChange* | (amount: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
enableProgressTracker* | boolean | — | Undocumented — add TSDoc to the prop in the library. |
onEnableProgressTrackerChange* | (enable: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
enableDownloads* | boolean | — | Undocumented — add TSDoc to the prop in the library. |
onEnableDownloadsChange* | (enable: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
showDownloads | boolean | false | The downloads toggle was hard-disabled in the app (`const showDownloads = false` — "moved to unlockable section"), which made the row unreachable. It is a prop here so the row stays renderable and reviewable; it still defaults to hidden, matching the app. |
currencySymbol | string | "$" | Currency symbol prefixed to the deposit field. BTS bills in AUD. |
defaultOpenControl | AdvancedSectionOpenControl | — | Opens one of the dropdowns on mount so each menu is a static story. |
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/AdvancedSection.tsx- Portability
- Needs its app dependencies replaced by props before it renders in isolation.