跳到内容
Yuva discussion list菜单

Yuva discussion list

The discussions of a page with New, Top and Unanswered tabs, answered and locked badges, votes and reply counts.

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

安装

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

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

用法

tsx
import { YuvaDiscussionList } from "@/components/yuva-discussion-list"

<YuvaDiscussionList page={page} onSelect={(discussion) => setId(discussion.id)} />

Props

YuvaDiscussionListProps

Prop类型
pagestring | null | undefined
sort?DiscussionSort
onSortChange?(sort: DiscussionSort) => void
onSelect(discussion: Discussion) => void
labels?Partial<YuvaDiscussionsLabels>
className?string

标签

标签列在 Yuva discussions 页面。

依赖

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

来自 shadcn/ui 的组件

其他 Yuva 项

npm 包