ਪ੍ਰੀਵਿਊ ਨਮੂਨਾ ਡੇਟਾ ਉੱਤੇ ਚੱਲਦਾ ਹੈ। ਇਸ ਨੂੰ ਨੈੱਟਵਰਕ ਜਾਂ ਚੈਨਲ ਦੀ ਲੋੜ ਨਹੀਂ।
tsx
import { YuvaChatComposer } from "@/components/yuva-chat-composer"
import { useYuvaChat } from "@/hooks/use-yuva-chat"
export function Composer() {
const chat = useYuvaChat({
server={process.env.NEXT_PUBLIC_YUVA_SERVER}
channel={process.env.NEXT_PUBLIC_YUVA_CHANNEL},
})
return <YuvaChatComposer chat={chat} />
}ਇੰਸਟਾਲੇਸ਼ਨ
ਇਸ ਨੂੰ ਇੱਕ shadcn ਪ੍ਰੋਜੈਕਟ ਵਿੱਚ ਚਲਾਓ। ਫ਼ਾਈਲਾਂ ਤੁਹਾਡੇ ਆਪਣੇ ਕੋਡ ਵਿੱਚ ਕਾਪੀ ਹੋ ਜਾਂਦੀਆਂ ਹਨ।
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-chat-composer.jsonਵਰਤੋਂ
tsx
import { YuvaChatComposer } from "@/components/yuva-chat-composer"
<YuvaChatComposer chat={chat} />Props
YuvaChatComposerProps
| Prop | ਕਿਸਮ |
|---|---|
chat | YuvaChatState |
labels? | Partial<YuvaChatLabels> |
locale? | string |
disabled? | boolean |
onCapture? | () => File | null | undefined | Promise<File | null | undefined> |
className? | string |
ਲੇਬਲ
ਲੇਬਲ Yuva chat ਪੰਨੇ ਉੱਤੇ ਸੂਚੀਬੱਧ ਹਨ।
ਨਿਰਭਰਤਾਵਾਂ
ਇਸ ਆਈਟਮ ਨੂੰ ਇੰਸਟਾਲ ਕਰਨ ਨਾਲ ਹੇਠਾਂ ਦਿੱਤੇ ਵੀ ਜੁੜ ਜਾਂਦੇ ਹਨ।