跳到内容
Yuva discussion thread菜单

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.

预览使用示例数据运行,不需要网络,也不需要渠道。

安装

在 shadcn 项目中运行。文件会复制到你自己的代码里。

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

用法

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

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

Props

YuvaDiscussionThreadProps

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

标签

标签列在 Yuva discussions 页面。

依赖

安装此项时还会添加以下内容。

来自 shadcn/ui 的组件

其他 Yuva 项

npm 包