Skip to content

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.

PropTypeDefaultDescription
product*Product—Undocumented — add TSDoc to the prop in the library.
lessonOpenboolean—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.
defaultLessonOpenboolean—Uncontrolled equivalent of `lessonOpen`.
onEventCancel() => void—Forwarded to `EventRegisteredView` for event products.
isMobileboolean—Viewport override, forwarded to `CoursePlayer` so both trees are renderable.
defaultDescExpandedbooleanfalseDescription 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.
coursePropsPartial<Omit<CoursePlayerProps, "product">>—Anything else to hand to `CoursePlayer` for course products.
eventPropsPartial<Omit<EventRegisteredViewProps, "product">>—Anything else to hand to `EventRegisteredView` for event products.
showMoreLabelstring"Show more"Undocumented — add TSDoc to the prop in the library.
showLessLabelstring"Show less"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/UnlockedProductViewer.tsx
Portability
Needs its app dependencies replaced by props before it renders in isolation.