{
  "name": "notif-badge",
  "type": "registry:ui",
  "framework": "react",
  "title": "Notification Badge",
  "description": "A small count badge or unread dot for signalling new activity on avatars and channels.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@newtui/avatar"
  ],
  "files": [
    {
      "path": "ui/notif-badge.tsx",
      "content": "import { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst notifBadgeVariants = cva(\n  \"inline-flex items-center justify-center rounded-full border-2 border-newt-bg-base text-[11px] font-bold leading-none text-newt-on-accent\",\n  {\n    variants: {\n      variant: {\n        default: \"h-4 min-w-4 bg-newt-dnd px-1\",\n        mention: \"h-4 min-w-4 bg-newt-dnd px-1\",\n        unread: \"h-2 w-2 min-w-0 bg-newt-text-primary p-0\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nexport interface NotifBadgeProps\n  extends\n    React.ComponentProps<\"span\">,\n    VariantProps<typeof notifBadgeVariants> {}\n\nconst NotifBadge = React.forwardRef<HTMLSpanElement, NotifBadgeProps>(\n  ({ className, variant, ...props }, ref) => (\n    <span\n      ref={ref}\n      className={cn(notifBadgeVariants({ variant }), className)}\n      {...props}\n    />\n  )\n)\nNotifBadge.displayName = \"NotifBadge\"\n\nexport { NotifBadge, notifBadgeVariants }\n",
      "type": "registry:ui"
    }
  ]
}