跳到内容
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 包