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