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.
| Prop | Type | Default | Description |
|---|---|---|---|
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. |
tiers | TierOption[] | [] | Paid access tiers offered by the "Included in tier" picker. The app read these from its access-tiers context. |
isMobile | boolean | false | Forces the mobile tree. The app called `useIsMobile()`; this is a plain prop so both trees can be rendered side by side. |
slots | CourseEditorLayoutSlots | — | Undocumented — add TSDoc to the prop in the library. |
initialOpenSection | string | "product-details" | Which section starts open. Lifts the accordion's `useState` for snapshots. |
openSection | string | — | Fully controlled open section. Pair with `onOpenSectionChange`. |
onOpenSectionChange | (value: string) => void | — | Undocumented — add TSDoc to the prop in the library. |
initialPromoSelectedIndex | number | 0 | Seeds 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. |
titlePlaceholder | string | "e.g. Growth Marketing Masterclass" | Undocumented — add TSDoc to the prop in the library. |
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/CourseEditorLayout.tsx- Portability
- Needs its app dependencies replaced by props before it renders in isolation.