Gå til indhold
Yuva discussion composerMenu

Yuva discussion composer

A Markdown composer with Write and Preview tabs for new discussions, replies and edits, and the reader sign-in prompt.

Markdown is supported.

Forhåndsvisningen kører på eksempeldata. Den kræver hverken netværk eller kanal.

Installation

Kør dette i et shadcn-projekt. Filerne kopieres ind i din egen kode.

Shell
npx shadcn@latest add https://useyuva.com/r/yuva-discussion-composer.json

Brug

tsx
import { YuvaDiscussionComposer } from "@/components/yuva-discussion-composer"

<YuvaDiscussionComposer withTitle onSubmit={async ({ title, body }) => {}} />

Props

YuvaDiscussionComposerProps

PropType
withTitle?boolean
initialTitle?string
initialBody?string
submitLabel?string
placeholder?string
autoFocus?boolean
labels?Partial<YuvaDiscussionsLabels>
className?string
onTitleChange?(title: string) => void
onSubmit(input: { title: string; body: string }) => Promise<unknown>
onCancel?() => void

YuvaSignInProps

PropType
labels?Partial<YuvaDiscussionsLabels>
className?string

Etiketter

Etiketterne er listet på Yuva discussions.

Afhængigheder

Når du installerer dette element, tilføjes også følgende.

Komponenter fra shadcn/ui

Andre Yuva-elementer

npm-pakker