પ્રીવ્યૂ નમૂના ડેટા પર ચાલે છે. તેને નેટવર્ક કે ચેનલની જરૂર નથી.
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 |
લેબલ
લેબલ Yuva help પૃષ્ઠ પર સૂચિબદ્ધ છે.
નિર્ભરતાઓ
આ આઇટમ ઇન્સ્ટોલ કરવાથી નીચેનું પણ ઉમેરાય છે.