CommandMenuGroup.tsx23 lines · main
| 1 | 'use client' |
| 2 | |
| 3 | import { forwardRef } from 'react' |
| 4 | import { cn, CommandGroup } from 'ui' |
| 5 | |
| 6 | const CommandMenuGroup = forwardRef< |
| 7 | React.ElementRef<typeof CommandGroup>, |
| 8 | React.ComponentPropsWithoutRef<typeof CommandGroup> |
| 9 | >(({ className, ...props }, ref) => { |
| 10 | return ( |
| 11 | <CommandGroup |
| 12 | ref={ref} |
| 13 | className={cn( |
| 14 | 'overflow-hidden py-3 px-2 text-foreground-lighter/60 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:pb-1.5 **:[[cmdk-group-heading]]:text-sm **:[[cmdk-group-heading]]:font-normal [&_[cmdk-group-heading]]:text-foreground-lighter/60', |
| 15 | className |
| 16 | )} |
| 17 | {...props} |
| 18 | /> |
| 19 | ) |
| 20 | }) |
| 21 | CommandMenuGroup.displayName = 'CommandMenuGroup' |
| 22 | |
| 23 | export { CommandMenuGroup } |