chore(ui-toolkit): remove forwardRef as refs weren't being passed (#4160)
This commit is contained in:
parent
fc047feeee
commit
13f2e51798
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user