Was this page helpful?
The preview runs on sample data. It needs no network and no channel.
tsx
import { YuvaPageFeedback } from "@/components/yuva-page-feedback"
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}
>
<YuvaPageFeedback pageTitle="Getting started" />
</YuvaDiscussionsProvider>
)
}Installation
Run this in a shadcn project. The files are copied into your own code.
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-page-feedback.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-page-feedback.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-page-feedback.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-page-feedback.jsonUsage
tsx
import { YuvaPageFeedback } from "@/components/yuva-page-feedback"
<YuvaPageFeedback />Props
YuvaPageFeedbackProps
| Prop | Type |
|---|---|
page? | string |
pageTitle? | string |
labels? | Partial<YuvaDiscussionsLabels> |
className? | string |
Labels
Every label has an English default. Pass a partial labels object to change or translate them.
| Label | Default |
|---|---|
feedbackQuestion | "Was this page helpful?" |
feedbackYes | "Yes" |
feedbackNo | "No" |
feedbackThanks | "Thanks for your feedback." |
Dependencies
Installing this item also adds the following.