미리보기는 샘플 데이터로 동작합니다. 네트워크도 채널도 필요 없습니다.
tsx
import { YuvaHelpArticle } from "@/components/yuva-help-article"
export function Article({ id }: { id: string }) {
return (
<YuvaHelpArticle
server={process.env.NEXT_PUBLIC_YUVA_SERVER}
channel={process.env.NEXT_PUBLIC_YUVA_CHANNEL}
id={id}
onAsk={(articleId) => openChat(articleId)}
/>
)
}설치
shadcn 프로젝트에서 실행하세요. 파일이 여러분의 코드로 복사됩니다.
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-help-article.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-help-article.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-help-article.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-help-article.json사용법
tsx
import { YuvaHelpArticle } from "@/components/yuva-help-article"
<YuvaHelpArticle server={server} channel={channel} id={articleId} onAsk={(id) => chat.open(id)} />Props
YuvaHelpArticleProps
| Prop | 유형 |
|---|---|
id | string |
server? | string |
channel? | string |
client? | YuvaClient |
identityToken? | IdentityTokenSource | null |
locale? | string |
help? | YuvaHelpState |
search? | string |
onSelect? | (article: ClientHelpArticleSummary) => void |
onAsk? | (articleId: string) => void |
labels? | Partial<YuvaHelpLabels> |
className? | string |
레이블
의존성
이 항목을 설치하면 다음도 함께 추가됩니다.