Skip to content

Commit

Permalink
Add dedicated DropdownMenuGroupLabelProps type
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Aug 28, 2024
1 parent 5df6768 commit 4843b88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/dropdown-menu-v2/group-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { forwardRef, useContext } from '@wordpress/element';
import type { WordPressComponentProps } from '../context';
import { DropdownMenuContext } from './context';
import { Text } from '../text';
import type { DropdownMenuGroupProps } from './types';
import type { DropdownMenuGroupLabelProps } from './types';
import * as Styled from './styles';

export const DropdownMenuGroupLabel = forwardRef<
HTMLDivElement,
WordPressComponentProps< DropdownMenuGroupProps, 'div', false >
WordPressComponentProps< DropdownMenuGroupLabelProps, 'div', false >
>( function DropdownMenuGroup( props, ref ) {
const dropdownMenuContext = useContext( DropdownMenuContext );
return (
Expand Down
7 changes: 7 additions & 0 deletions packages/components/src/dropdown-menu-v2/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ export interface DropdownMenuGroupProps {
children: React.ReactNode;
}

export interface DropdownMenuGroupLabelProps {
/**
* The contents of the dropdown menu group.
*/
children: React.ReactNode;
}

export interface DropdownMenuItemProps {
/**
* The contents of the menu item.
Expand Down

0 comments on commit 4843b88

Please sign in to comment.