Skip to content

Store editor

Pricing section

Pricing model and recurring interval.
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.

Pricing 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.

PropTypeDefaultDescription
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.
includedTierIdstring—Selected access tier for `pricingModel === "included"`.
onIncludedTierIdChange(tierId: string) => void—Undocumented — add TSDoc to the prop in the library.
tiersTierOption[][]Access tiers offered by the "Included in tier" picker. The app read these from its access-tiers context; here they are supplied by the caller. Free tiers are filtered out downstream — a product cannot be "included" in a tier nobody pays for.
currencySymbolstring"$"Currency symbol prefixed to the price field. BTS bills in AUD.
defaultOpenControlPricingSectionOpenControl—Opens one of the dropdowns on mount so each menu is a static story rather than a click path. Not used by the app.
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/store/editor/sections/PricingSection.tsx
Portability
Needs its app dependencies replaced by props before it renders in isolation.