Skip to content

Store editor

Course editor layout

The course variant of the editor shell, with the module outline in place of sections.
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.

Course editor layout

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
form*ProductFormState—Undocumented — add TSDoc to the prop in the library.
onFormChange*(updates: Partial<ProductFormState>) => void—Undocumented — add TSDoc to the prop in the library.
tiersTierOption[][]Paid access tiers offered by the "Included in tier" picker. The app read these from its access-tiers context.
isMobilebooleanfalseForces the mobile tree. The app called `useIsMobile()`; this is a plain prop so both trees can be rendered side by side.
slotsCourseEditorLayoutSlots—Undocumented — add TSDoc to the prop in the library.
initialOpenSectionstring"product-details"Which section starts open. Lifts the accordion's `useState` for snapshots.
openSectionstring—Fully controlled open section. Pair with `onOpenSectionChange`.
onOpenSectionChange(value: string) => void—Undocumented — add TSDoc to the prop in the library.
initialPromoSelectedIndexnumber0Seeds the promo hero selection.
toPromoImageValue(file: File, index: number) => string—Turns a picked promo file into the string held in `form.promoImages`. Defaults to the inline placeholder still.
titlePlaceholderstring"e.g. Growth Marketing Masterclass"Undocumented — add TSDoc to the prop in the library.
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/CourseEditorLayout.tsx
Portability
Needs its app dependencies replaced by props before it renders in isolation.