प्रिव्यू नमूना डेटा पर चलता है। इसे न नेटवर्क चाहिए, न चैनल।
tsx
import { YuvaRoadmap } from "@/components/yuva-roadmap"
export function Roadmap() {
return (
<YuvaRoadmap
server={process.env.NEXT_PUBLIC_YUVA_SERVER}
channel={process.env.NEXT_PUBLIC_YUVA_CHANNEL}
/>
)
}इंस्टॉलेशन
इसे किसी shadcn प्रोजेक्ट में चलाएँ। फ़ाइलें आपके अपने कोड में कॉपी हो जाती हैं।
Shell
npx shadcn@latest add https://useyuva.com/r/yuva-roadmap.jsonShell
pnpm dlx shadcn@latest add https://useyuva.com/r/yuva-roadmap.jsonShell
yarn dlx shadcn@latest add https://useyuva.com/r/yuva-roadmap.jsonShell
bunx --bun shadcn@latest add https://useyuva.com/r/yuva-roadmap.jsonउपयोग
tsx
import { YuvaRoadmap } from "@/components/yuva-roadmap"
<YuvaRoadmap server={server} channel={channel} />Props
YuvaRoadmapProps
| Prop | प्रकार |
|---|---|
server? | string |
channel? | string |
identityToken? | IdentityTokenSource | null |
client? | YuvaClient |
defaultStage? | YuvaRoadmapStage |
labels? | Partial<YuvaRoadmapLabels> |
discussionLabels? | Partial<YuvaDiscussionsLabels> |
locale? | string |
className? | string |
YuvaRoadmapListProps
| Prop | प्रकार |
|---|---|
stage? | YuvaRoadmapStage |
onStageChange? | (stage: YuvaRoadmapStage) => void |
onSelect | (idea: Discussion) => void |
onSuggest? | () => void |
labels? | Partial<YuvaRoadmapLabels> |
discussionLabels? | Partial<YuvaDiscussionsLabels> |
className? | string |
लेबल
हर लेबल का अंग्रेज़ी डिफ़ॉल्ट है। उन्हें बदलने या अनुवाद करने के लिए labels ऑब्जेक्ट का एक हिस्सा दें।
| लेबल | डिफ़ॉल्ट |
|---|---|
heading | "Roadmap" |
stageIdeas | "Ideas" |
stagePlanned | "Planned" |
stageInProgress | "In progress" |
stageShipped | "Shipped" |
stageClosed | "Closed" |
suggest | "Suggest an idea" |
suggestHeading | "Suggest an idea" |
suggestTitlePlaceholder | "Your idea in a few words" |
suggestBodyPlaceholder | "Describe it. What do you need, and why? Markdown works." |
sendIdea | "Send idea" |
similarIdeas | "Similar ideas" |
ideaSent | "Thanks! Your idea is on the board." |
ideaPending | "Thanks! The team will review your idea before it is shown." |
votingClosed | "Voting is closed for this idea." |
empty | "Nothing here yet." |
vote | (title) => `Vote for ${title}` |
removeVote | (title) => `Remove your vote for ${title}` |
votes | (count) => (count === 1 ? "1 vote" : `${count} votes`) |
back | "Roadmap" |
निर्भरताएँ
इस आइटम को इंस्टॉल करने से नीचे दिए गए भी जुड़ जाते हैं।