跳到內容
Yuva help search選單

Yuva help search

A search field over the help center with live results: the matched words highlighted in the title and excerpt, and the click counted for the report.

預覽使用範例資料執行,不需要網路,也不需要頻道。

安裝

在 shadcn 專案中執行。檔案會複製到你自己的程式碼裡。

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

用法

tsx
import { YuvaHelpSearch } from "@/components/yuva-help-search"

<YuvaHelpSearch server={server} channel={channel} onSelect={(article) => setId(article.id)} />

Props

YuvaHelpSearchProps

Prop類型
server?string
channel?string
client?YuvaClient
identityToken?IdentityTokenSource | null
locale?string
help?YuvaHelpState
query?string
onQueryChange?(query: string) => void
onSelect?(article: ClientHelpArticleSummary, query: string) => void
labels?Partial<YuvaHelpLabels>
className?string

標籤

標籤列在 Yuva help 頁面。

相依套件

安裝此項目時還會加入以下內容。

來自 shadcn/ui 的元件

其他 Yuva 項目

npm 套件