{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/button-group-11","type":"registry:component","title":"Button Group 11","description":"Git merge button group with dropdown menu for merge strategy selection","dependencies":["lucide-react"],"registryDependencies":["button","button-group","dropdown-menu"],"files":[{"path":"src/registry/new-york/components/button-group/button-group-11.tsx","content":"'use client'\n\nimport { useState } from 'react'\n\nimport { ChevronDownIcon } from 'lucide-react'\n\nimport { Button } from '@/registry/new-york/ui/button'\nimport { ButtonGroup } from '@/registry/new-york/ui/button-group'\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuRadioGroup,\n  DropdownMenuRadioItem,\n  DropdownMenuTrigger\n} from '@/registry/new-york/ui/dropdown-menu'\n\nconst options = [\n  {\n    label: 'Merge pull request',\n    description: 'All commits from this branch will be added to the base branch via a commit version.'\n  },\n  {\n    label: 'Squash and merge',\n    description: 'The 6 commits from this branch will be combined into one commit in the base branch.'\n  },\n  {\n    label: 'Rebase and merge',\n    description: 'The 6 commits from this branch will be rebased and added to the base branch.'\n  }\n]\n\nconst ButtonGroupDropdownDemo = () => {\n  const [selectedIndex, setSelectedIndex] = useState('0')\n\n  return (\n    <ButtonGroup className='divide-primary-foreground/30 divide-x'>\n      <Button>{options[Number(selectedIndex)].label}</Button>\n      <DropdownMenu>\n        <DropdownMenuTrigger asChild>\n          <Button size='icon'>\n            <ChevronDownIcon />\n            <span className='sr-only'>Select option</span>\n          </Button>\n        </DropdownMenuTrigger>\n        <DropdownMenuContent side='bottom' sideOffset={4} align='end' className='max-w-64 md:max-w-xs!'>\n          <DropdownMenuRadioGroup value={selectedIndex} onValueChange={setSelectedIndex}>\n            {options.map((option, index) => (\n              <DropdownMenuRadioItem key={option.label} value={String(index)} className='items-start [&>span]:pt-1.5'>\n                <div className='flex flex-col gap-1'>\n                  <span className='text-sm font-medium'>{option.label}</span>\n                  <span className='text-muted-foreground text-xs'>{option.description}</span>\n                </div>\n              </DropdownMenuRadioItem>\n            ))}\n          </DropdownMenuRadioGroup>\n        </DropdownMenuContent>\n      </DropdownMenu>\n    </ButtonGroup>\n  )\n}\n\nexport default ButtonGroupDropdownDemo\n","type":"registry:component","target":"components/shadcn-studio/button-group/button-group-11.tsx"}]}