跳到內容
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 套件