|
|
@@ -53,9 +53,11 @@ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayNam
|
|
|
|
|
|
const DropdownMenuContent = React.forwardRef<
|
|
|
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
|
- React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
|
->(({ className, sideOffset = 4, ...props }, ref) => (
|
|
|
- <DropdownMenuPrimitive.Portal>
|
|
|
+ React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
|
|
+ container?: HTMLElement
|
|
|
+ }
|
|
|
+>(({ className, sideOffset = 4, container, ...props }, ref) => (
|
|
|
+ <DropdownMenuPrimitive.Portal container={container}>
|
|
|
<DropdownMenuPrimitive.Content
|
|
|
ref={ref}
|
|
|
sideOffset={sideOffset}
|
|
|
@@ -79,7 +81,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
<DropdownMenuPrimitive.Item
|
|
|
ref={ref}
|
|
|
className={cn(
|
|
|
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
|
+ "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 active:opacity-90",
|
|
|
inset && "pl-8",
|
|
|
className,
|
|
|
)}
|