From 5b75ab04cad0727a23dc3de3ab32dd48df8c9dc2 Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Mon, 16 Dec 2024 13:11:11 +0530 Subject: [PATCH] fix: use dropdown menu props --- packages/block-library/src/archives/edit.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/block-library/src/archives/edit.js b/packages/block-library/src/archives/edit.js index b51bd9a4fe1e6b..d4f25da8507f3e 100644 --- a/packages/block-library/src/archives/edit.js +++ b/packages/block-library/src/archives/edit.js @@ -12,9 +12,16 @@ import { __ } from '@wordpress/i18n'; import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; import ServerSideRender from '@wordpress/server-side-render'; +/** + * Internal dependencies + */ +import { useToolsPanelDropdownMenuProps } from '../utils/hooks'; + export default function ArchivesEdit( { attributes, setAttributes } ) { const { showLabel, showPostCounts, displayAsDropdown, type } = attributes; + const dropdownMenuProps = useToolsPanelDropdownMenuProps(); + return ( <> @@ -28,6 +35,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) { type: 'monthly', } ); } } + dropdownMenuProps={ dropdownMenuProps } >