Skip to content

Commit 7244968

Browse files
im3dabasiaim3dabasiafabiankaegy
authored
Query Page Numbers: Add dropdown menu props to ToolsPanel component (#68013)
Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org> Co-authored-by: fabiankaegy < fabiankaegy@git.wordpress.org>
1 parent dad6c82 commit 7244968

File tree

1 file changed

+7
-0
lines changed
  • packages/block-library/src/query-pagination-numbers

1 file changed

+7
-0
lines changed

packages/block-library/src/query-pagination-numbers/edit.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import {
99
RangeControl,
1010
} from '@wordpress/components';
1111

12+
/**
13+
* Internal dependencies
14+
*/
15+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
16+
1217
const createPaginationItem = ( content, Tag = 'a', extraClass = '' ) => (
1318
<Tag key={ content } className={ `page-numbers ${ extraClass }` }>
1419
{ content }
@@ -50,13 +55,15 @@ export default function QueryPaginationNumbersEdit( {
5055
const paginationNumbers = previewPaginationNumbers(
5156
parseInt( midSize, 10 )
5257
);
58+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
5359

5460
return (
5561
<>
5662
<InspectorControls>
5763
<ToolsPanel
5864
label={ __( 'Settings' ) }
5965
resetAll={ () => setAttributes( { midSize: 2 } ) }
66+
dropdownMenuProps={ dropdownMenuProps }
6067
>
6168
<ToolsPanelItem
6269
label={ __( 'Number of links' ) }

0 commit comments

Comments
 (0)