Compare commits

...
Author SHA1 Message Date
Matthew Russell a1e8fc878d chore: remove forwardRef as refs weren't being passed 2023-06-21 17:11:27 -07:00
@@ -1,6 +1,6 @@
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
import classNames from 'classnames'; import classNames from 'classnames';
import type { ReactNode } from 'react'; import type { ComponentProps, ReactNode } from 'react';
import { forwardRef } from 'react'; import { forwardRef } from 'react';
import { VegaIcon, VegaIconNames } from '../icon'; import { VegaIcon, VegaIconNames } from '../icon';
import { Icon } from '../icon'; import { Icon } from '../icon';
@@ -164,10 +164,9 @@ export const DropdownMenuSeparator = forwardRef<
/** /**
* Container element for submenus * Container element for submenus
*/ */
export const DropdownMenuSub = forwardRef< export const DropdownMenuSub = (
React.ElementRef<typeof DropdownMenuPrimitive.Sub>, subProps: ComponentProps<typeof DropdownMenuPrimitive.Sub>
React.ComponentProps<typeof DropdownMenuPrimitive.Sub> ) => <DropdownMenuPrimitive.Sub {...subProps} />;
>(({ ...subProps }) => <DropdownMenuPrimitive.Sub {...subProps} />);
/** /**
* Container within a DropdownMenuSub specifically for the content * Container within a DropdownMenuSub specifically for the content
@@ -201,10 +200,9 @@ export const DropdownMenuSubTrigger = forwardRef<
* Portal to ensure menu portions are rendered outwith where they appear in the * Portal to ensure menu portions are rendered outwith where they appear in the
* DOM. * DOM.
*/ */
export const DropdownMenuPortal = forwardRef< export const DropdownMenuPortal = (
React.ElementRef<typeof DropdownMenuPrimitive.Portal>, portalProps: ComponentProps<typeof DropdownMenuPrimitive.Portal>
React.ComponentProps<typeof DropdownMenuPrimitive.Portal> ) => <DropdownMenuPrimitive.Portal {...portalProps} />;
>(({ ...portalProps }) => <DropdownMenuPrimitive.Portal {...portalProps} />);
/** /**
* Wraps a regular DropdownMenuItem with copy to clip board functionality * Wraps a regular DropdownMenuItem with copy to clip board functionality