Skip to content
Yuva discussion threadMenu

Yuva discussion thread

One discussion: the opening post, the accepted answer, replies one level deep, votes, follow, accept, edit and delete, and the reply composer.

The preview runs on sample data. It needs no network and no channel.

Installation

Run this in a shadcn project. The files are copied into your own code.

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

Usage

tsx
import { YuvaDiscussionThread } from "@/components/yuva-discussion-thread"

<YuvaDiscussionThread id={id} onBack={() => setId(null)} />

Props

YuvaDiscussionThreadProps

PropType
idstring
labels?Partial<YuvaDiscussionsLabels>
className?string
onBack?() => void
onGone?() => void
badges?(discussion: Discussion) => React.ReactNode
votingClosed?(discussion: Discussion) => boolean

Labels

The labels are listed on Yuva discussions.

Dependencies

Installing this item also adds the following.

Components from shadcn/ui

Other Yuva items

npm packages