{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "toggle-group", "type": "registry:ui", "dependencies": ["@ark-ui/react", "class-variance-authority"], "registryDependencies": ["https://ui.shipbase.xyz/r/react/toggle.json"], "files": [ { "path": "./src/components/ui/toggle-group.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { ToggleGroup as ToggleGroupPrimitive } from \"@ark-ui/react/toggle-group\"\nimport type { VariantProps } from \"class-variance-authority\"\n\nimport { toggleVariants } from \"@/components/ui/toggle\"\nimport { cn } from \"@/lib/utils\"\n\nconst ToggleGroupExtendContext = React.createContext<\n VariantProps\n>({\n size: \"default\",\n variant: \"default\",\n})\n\nconst ToggleGroup = React.forwardRef<\n React.ElementRef,\n ToggleGroupPrimitive.RootProps & VariantProps\n>(({ className, variant, size, children, ...props }, ref) => (\n \n \n {children}\n \n \n))\nToggleGroup.displayName = \"ToggleGroup\"\n\nconst ToggleGroupContext = ToggleGroupPrimitive.Context\n\nconst ToggleGroupItem = React.forwardRef<\n React.ElementRef,\n ToggleGroupPrimitive.ItemProps & VariantProps\n>(({ className, variant, size, ...props }, ref) => {\n const context = React.useContext(ToggleGroupExtendContext)\n\n return (\n \n )\n})\nToggleGroupItem.displayName = \"ToggleGroupItem\"\n\nconst ToggleGroupRootProvider = ToggleGroupPrimitive.RootProvider\n\nexport {\n ToggleGroup,\n ToggleGroupContext,\n ToggleGroupItem,\n ToggleGroupRootProvider,\n}\n\nexport {\n useToggleGroup,\n useToggleGroupContext,\n type ToggleGroupValueChangeDetails,\n} from \"@ark-ui/react/toggle-group\"\n", "type": "registry:ui" } ] }