Store editor
Course settings section
Drip, access and completion rules for a course.
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 settings 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 |
|---|---|---|---|
form* | CourseSettingsFormValues | — | Undocumented — add TSDoc to the prop in the library. |
onFormChange* | (updates: Partial<CourseSettingsFormValues>) => void | — | Undocumented — add TSDoc to the prop in the library. |
now | Date | COURSE_SETTINGS_DEFAULT_NOW | Reference date. Feeds the calendar's today marker and the default past-days-disabled matcher. Fixed by default — never reads the clock. |
disableDate | (date: Date) => boolean | — | Which days the calendar refuses. Defaults to "anything before `now`". |
expiryEnabled | boolean | — | Controlled expiry toggle. Leave undefined to let the section manage it, and use `initialExpiryEnabled` to pin a story to either state. |
initialExpiryEnabled | boolean | — | Seeds the expiry toggle when uncontrolled. Defaults to "on if the form already carries an expiry date", which is what the app derived on mount. |
onExpiryEnabledChange | (enabled: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
defaultDatePickerOpen | boolean | — | Opens the date calendar on mount so it is a static story, not a click path. |
title | string | "Configure" | Section heading above the card. |
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/CourseSettingsSection.tsx- Portability
- Needs its app dependencies replaced by props before it renders in isolation.
- Notes
- Takes a now value.