11import * as React from "react"
22import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
33import { PortalProps } from "@radix-ui/react-portal"
4- import { CheckIcon , ChevronRightIcon , DotFilledIcon } from "@radix-ui/react-icons"
4+ import { CheckIcon , DotFilledIcon } from "@radix-ui/react-icons"
55
66import { cn } from "@/lib/utils"
77
@@ -13,47 +13,8 @@ const DropdownMenuGroup = DropdownMenuPrimitive.Group
1313
1414const DropdownMenuPortal = DropdownMenuPrimitive . Portal
1515
16- const DropdownMenuSub = DropdownMenuPrimitive . Sub
17-
1816const DropdownMenuRadioGroup = DropdownMenuPrimitive . RadioGroup
1917
20- const DropdownMenuSubTrigger = React . forwardRef <
21- React . ElementRef < typeof DropdownMenuPrimitive . SubTrigger > ,
22- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . SubTrigger > & {
23- inset ?: boolean
24- }
25- > ( ( { className, inset, children, ...props } , ref ) => (
26- < DropdownMenuPrimitive . SubTrigger
27- ref = { ref }
28- className = { cn (
29- "flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0" ,
30- "focus:bg-vscode-list-activeSelectionBackground focus:text-vscode-list-activeSelectionForeground" ,
31- "data-[state=open]:bg-vscode-list-activeSelectionBackground data-[state=open]:text-vscode-list-activeSelectionForeground" ,
32- inset && "pl-8" ,
33- className ,
34- ) }
35- { ...props } >
36- { children }
37- < ChevronRightIcon className = "ml-auto" />
38- </ DropdownMenuPrimitive . SubTrigger >
39- ) )
40- DropdownMenuSubTrigger . displayName = DropdownMenuPrimitive . SubTrigger . displayName
41-
42- const DropdownMenuSubContent = React . forwardRef <
43- React . ElementRef < typeof DropdownMenuPrimitive . SubContent > ,
44- React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . SubContent >
45- > ( ( { className, ...props } , ref ) => (
46- < DropdownMenuPrimitive . SubContent
47- ref = { ref }
48- className = { cn (
49- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2" ,
50- className ,
51- ) }
52- { ...props }
53- />
54- ) )
55- DropdownMenuSubContent . displayName = DropdownMenuPrimitive . SubContent . displayName
56-
5718const DropdownMenuContent = React . forwardRef <
5819 React . ElementRef < typeof DropdownMenuPrimitive . Content > ,
5920 React . ComponentPropsWithoutRef < typeof DropdownMenuPrimitive . Content > & Pick < PortalProps , "container" >
@@ -63,8 +24,11 @@ const DropdownMenuContent = React.forwardRef<
6324 ref = { ref }
6425 sideOffset = { sideOffset }
6526 className = { cn (
66- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md " ,
27+ "z-50 min-w-[8rem] overflow-hidden rounded-xs p-1 shadow-xs " ,
6728 "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2" ,
29+ "border border-vscode-dropdown-border" ,
30+ "bg-vscode-dropdown-background" ,
31+ "text-vscode-dropdown-foreground" ,
6832 className ,
6933 ) }
7034 { ...props }
@@ -179,8 +143,5 @@ export {
179143 DropdownMenuShortcut ,
180144 DropdownMenuGroup ,
181145 DropdownMenuPortal ,
182- DropdownMenuSub ,
183- DropdownMenuSubContent ,
184- DropdownMenuSubTrigger ,
185146 DropdownMenuRadioGroup ,
186147}
0 commit comments