Shared
Create post panel
CreatePostPanel — exported from the library at `src/components/posts/CreatePostPanel.tsx`. Awaiting a written description.
Available
Ports as-is
All variants
Every variant this component declares, rendered together in one frame from its maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.
Create post panel
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 |
|---|---|---|---|
onPost | (content: string, media: PostMedia[], monetization?: MonetizationSettings, product?: PostProduct) => void | — | Undocumented — add TSDoc to the prop in the library. |
forceOpen | boolean | — | Undocumented — add TSDoc to the prop in the library. |
onOpenChange | (open: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
mode | "create" | "edit" | "create" | When provided, the panel renders in edit mode (no overlay, no collapse, Save/Cancel footer). |
initialContent | string | — | Undocumented — add TSDoc to the prop in the library. |
initialMedia | InitialMedia[] | — | Undocumented — add TSDoc to the prop in the library. |
initialProduct | PostProduct | null | — | Undocumented — add TSDoc to the prop in the library. |
initialMonetization | MonetizationSettings | — | Undocumented — add TSDoc to the prop in the library. |
onSave | (content: string, media: PostMedia[], monetization?: MonetizationSettings, product?: PostProduct) => void | — | Undocumented — add TSDoc to the prop in the library. |
onCancel | () => void | — | Undocumented — add TSDoc to the prop in the library. |
embedded | boolean | false | When true, hides the avatar column and the outer post-card chrome so the panel can be embedded inside an existing card. |
currentUser | { name: string; avatar?: string } | { name: "You" } | Current user shown beside the composer. Storybook supplies a fixture. |
products | StoreProduct[] | [] | Products offered by the attachment picker. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/posts/CreatePostPanel.tsx- Portability
- Copies across unchanged — only the utils import path moves.
- Variants
type: image | video | pdfpricingType: one-time | recurring | included-in-tierrecurringInterval: weekly | monthly | yearlypricing: free | paid | includedmode: create | edit