From 504986c509190ad77fc688a16f6a4518ec0bd82e Mon Sep 17 00:00:00 2001 From: Eshaan Dabasiya <76681468+im3dabasia@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:14:40 +0530 Subject: [PATCH] Query Page Numbers: Add dropdown menu props to ToolsPanel component (#68013) Co-authored-by: im3dabasia Co-authored-by: fabiankaegy < fabiankaegy@git.wordpress.org> --- .../block-library/src/query-pagination-numbers/edit.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/block-library/src/query-pagination-numbers/edit.js b/packages/block-library/src/query-pagination-numbers/edit.js index 0497393e2a4edc..cf2f92f41791ff 100644 --- a/packages/block-library/src/query-pagination-numbers/edit.js +++ b/packages/block-library/src/query-pagination-numbers/edit.js @@ -9,6 +9,11 @@ import { RangeControl, } from '@wordpress/components'; +/** + * Internal dependencies + */ +import { useToolsPanelDropdownMenuProps } from '../utils/hooks'; + const createPaginationItem = ( content, Tag = 'a', extraClass = '' ) => ( { content } @@ -50,6 +55,7 @@ export default function QueryPaginationNumbersEdit( { const paginationNumbers = previewPaginationNumbers( parseInt( midSize, 10 ) ); + const dropdownMenuProps = useToolsPanelDropdownMenuProps(); return ( <> @@ -57,6 +63,7 @@ export default function QueryPaginationNumbersEdit( { setAttributes( { midSize: 2 } ) } + dropdownMenuProps={ dropdownMenuProps } >