Vai al contenuto
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.

L'anteprima usa dati di esempio. Non richiede rete né canale.

Installazione

Esegui questo in un progetto shadcn. I file vengono copiati nel tuo codice.

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

Utilizzo

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

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

Props

YuvaDiscussionComposerProps

PropTipo
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

PropTipo
labels?Partial<YuvaDiscussionsLabels>
className?string

Etichette

Le etichette sono elencate in Yuva discussions.

Dipendenze

Installare questo elemento aggiunge anche quanto segue.

Componenti di shadcn/ui

Altri elementi Yuva

Pacchetti npm