ପ୍ରିଭ୍ୟୁ ନମୁନା ଡାଟାରେ ଚାଲେ। ଏହାକୁ ନେଟୱାର୍କ କିମ୍ବା ଚ୍ୟାନେଲ ଦରକାର ନାହିଁ।
tsx
import { YuvaDiscussionComposer } from "@/components/yuva-discussion-composer"
import { YuvaDiscussionsProvider } from "@/hooks/use-yuva-discussions"
export function Docs({ children }: { children: React.ReactNode }) {
return (
<YuvaDiscussionsProvider
server={process.env.NEXT_PUBLIC_YUVA_SERVER}
channel={process.env.NEXT_PUBLIC_YUVA_CHANNEL}
>
<YuvaDiscussionComposer withTitle onSubmit={async ({ title, body }) => save(title, body)} />
</YuvaDiscussionsProvider>
)
}ଇନଷ୍ଟଲେସନ୍
ଏହାକୁ ଏକ shadcn ପ୍ରକଳ୍ପରେ ଚଲାନ୍ତୁ। ଫାଇଲଗୁଡ଼ିକ ଆପଣଙ୍କ ନିଜ କୋଡ୍କୁ କପି ହୁଏ।
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-discussion-composer.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-discussion-composer.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-discussion-composer.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-discussion-composer.jsonବ୍ୟବହାର
tsx
import { YuvaDiscussionComposer } from "@/components/yuva-discussion-composer"
<YuvaDiscussionComposer withTitle onSubmit={async ({ title, body }) => {}} />Props
YuvaDiscussionComposerProps
| Prop | ପ୍ରକାର |
|---|---|
withTitle? | boolean |
initialTitle? | string |
initialBody? | string |
submitLabel? | string |
placeholder? | string |
autoFocus? | boolean |
labels? | Partial<YuvaDiscussionsLabels> |
className? | string |
onTitleChange? | (title: string) => void |
onSubmit | (input: { title: string; body: string }) => Promise<unknown> |
onCancel? | () => void |
YuvaSignInProps
| Prop | ପ୍ରକାର |
|---|---|
labels? | Partial<YuvaDiscussionsLabels> |
className? | string |
ଲେବଲ୍
ଲେବଲ୍ ଗୁଡ଼ିକ Yuva discussions ପୃଷ୍ଠାରେ ତାଲିକାଭୁକ୍ତ।
ନିର୍ଭରଶୀଳତା
ଏହି ଆଇଟମ୍ ଇନଷ୍ଟଲ୍ କଲେ ତଳେଥିବା ଗୁଡ଼ିକ ମଧ୍ୟ ଯୋଡ଼ା ହୁଏ।