{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "github-stars", "title": "GitHub Stars", "author": "ncdai ", "description": "Display GitHub repo star count with formatted numbers and full-count tooltip.", "registryDependencies": [ "button", "tooltip" ], "files": [ { "path": "src/registry/components/github-stars/github-stars.tsx", "content": "import { Button } from \"@/components/ui/button\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n\nexport type GitHubStarsProps = {\n /** GitHub repository in `owner/repo` format. */\n repo: string\n /** Number of stars to display. */\n stargazersCount: number\n /**\n * Optional locales for number formatting.\n * See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).\n * @defaultValue \"en-US\"\n */\n locales?: Intl.LocalesArgument\n}\n\nexport function GitHubStars({\n repo,\n stargazersCount,\n locales = \"en-US\",\n}: GitHubStarsProps) {\n return (\n \n \n \n \n\n \n {new Intl.NumberFormat(locales).format(stargazersCount)} stars\n \n \n )\n}\n", "type": "registry:component" } ], "type": "registry:component" }