diff --git a/src/components/DropdownMenu.tsx b/src/components/DropdownMenu.tsx index af2e52489..47e1a740a 100644 --- a/src/components/DropdownMenu.tsx +++ b/src/components/DropdownMenu.tsx @@ -8,6 +8,7 @@ import { Separator, Trigger, type DropdownMenuProps as RadixDropdownMenuProps, + type DropdownMenuTriggerProps as RadixDropdownMenuTriggerProps, } from '@radix-ui/react-dropdown-menu'; import styled from 'styled-components'; @@ -39,7 +40,11 @@ type ElementProps = { slotTopContent?: React.ReactNode; }; -export type DropdownMenuProps = StyleProps & ElementProps & RadixDropdownMenuProps; +export type DropdownMenuProps = StyleProps & + ElementProps & + RadixDropdownMenuProps & { + triggerOptions?: RadixDropdownMenuTriggerProps; + }; export const DropdownMenu = forwardRefFn( ( @@ -51,13 +56,14 @@ export const DropdownMenu = forwardRefFn( slotTopContent, side = 'bottom', sideOffset = 8, + triggerOptions, ...rest }: DropdownMenuProps, ref: Ref ) => { return ( - <$Trigger ref={ref} className={className}> + <$Trigger ref={ref} className={className} {...triggerOptions}> {children} <$DropdownIcon aria-hidden="true">