Store
Unlocked product viewer
What a member sees once a product is unlocked, by file type.
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.
Unlocked product viewer
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 |
|---|---|---|---|
product* | Product | — | Undocumented — add TSDoc to the prop in the library. |
lessonOpen | boolean | — | Mobile lesson-player state, forwarded to `CoursePlayer`. Only meaningful for course products. |
onLessonOpenChange | (open: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
defaultLessonOpen | boolean | — | Uncontrolled equivalent of `lessonOpen`. |
onEventCancel | () => void | — | Forwarded to `EventRegisteredView` for event products. |
isMobile | boolean | — | Viewport override, forwarded to `CoursePlayer` so both trees are renderable. |
defaultDescExpanded | boolean | false | Description expanded past its two-block clamp on mount. |
onDownloadFile | (file: ProductContentFile) => void | — | A file's download button was pressed. The app called `window.open(file.url, "_blank")`; navigation is the host's job. |
courseProps | Partial<Omit<CoursePlayerProps, "product">> | — | Anything else to hand to `CoursePlayer` for course products. |
eventProps | Partial<Omit<EventRegisteredViewProps, "product">> | — | Anything else to hand to `EventRegisteredView` for event products. |
showMoreLabel | string | "Show more" | Undocumented — add TSDoc to the prop in the library. |
showLessLabel | string | "Show less" | 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/UnlockedProductViewer.tsx- Portability
- Needs its app dependencies replaced by props before it renders in isolation.