Skip to content

Commit

Permalink
Spacer: Add dropdown menu props to Tools Panel component
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jan 18, 2025
1 parent a900e03 commit d619437
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/spacer/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { View } from '@wordpress/primitives';
*/
import { unlock } from '../lock-unlock';
import { MIN_SPACER_SIZE } from './constants';
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

const { useSpacingSizes } = unlock( blockEditorPrivateApis );

Expand Down Expand Up @@ -93,6 +94,8 @@ export default function SpacerControls( {
width,
isResizing,
} ) {
const dropdownMenuProps = useToolsPanelDropdownMenuProps();

return (
<InspectorControls>
<ToolsPanel
Expand All @@ -103,6 +106,7 @@ export default function SpacerControls( {
height: '100px',
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
{ orientation === 'horizontal' && (
<ToolsPanelItem
Expand Down

0 comments on commit d619437

Please sign in to comment.