Skip to content

Commit

Permalink
feat(menu): allow passing props to menu group child menu (#1454)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdunk authored Jan 6, 2025
1 parent f091539 commit 3b884e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/components/menu/menuGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Box, Flex, Popover, PopoverProps, Text} from '../../primitives'
import {Selectable} from '../../primitives/_selectable'
import {useRootTheme} from '../../theme'
import {Radius, SelectableTone} from '../../types'
import {Menu} from './menu'
import {Menu, MenuProps} from './menu'
import {useMenu} from './useMenu'

/**
Expand All @@ -16,6 +16,7 @@ export interface MenuGroupProps {
as?: React.ElementType | keyof React.JSX.IntrinsicElements
fontSize?: number | number[]
icon?: React.ElementType | React.ReactNode
menu?: MenuProps
padding?: number | number[]
popover?: Omit<PopoverProps, 'content' | 'open'>
radius?: Radius | Radius[]
Expand All @@ -36,6 +37,7 @@ export function MenuGroup(
children,
fontSize = 1,
icon: IconComponent,
menu: menuProps,
onClick,
padding = 3,
popover,
Expand Down Expand Up @@ -136,6 +138,7 @@ export function MenuGroup(
onMouseEnter={handleMenuMouseEnter}
registerElement={registerElement}
shouldFocus={shouldFocus}
{...menuProps}
>
{children}
</Menu>
Expand Down

0 comments on commit 3b884e2

Please sign in to comment.