Lompat ke konten
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.

Pratinjau berjalan dengan data contoh. Tidak butuh jaringan maupun kanal.

Instalasi

Jalankan ini di proyek shadcn. File disalin ke kode Anda sendiri.

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

Penggunaan

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

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

Props

YuvaDiscussionComposerProps

PropTipe
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

PropTipe
labels?Partial<YuvaDiscussionsLabels>
className?string

Label

Label tercantum di Yuva discussions.

Dependensi

Menginstal item ini juga menambahkan yang berikut.

Komponen dari shadcn/ui

Item Yuva lainnya

Paket npm