Skip to content

Commit

Permalink
Add Tools Panel dropdown menu props to More block (#68039)
Browse files Browse the repository at this point in the history
Co-authored-by: Infinite-Null <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
3 people authored Dec 23, 2024
1 parent d1ba3bb commit 5a59c03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-library/src/more/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import {
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
import { ENTER } from '@wordpress/keycodes';
import { getDefaultBlockName, createBlock } from '@wordpress/blocks';
/**
* Internal dependencies
*/
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

const DEFAULT_TEXT = __( 'Read more' );

Expand Down Expand Up @@ -41,6 +45,8 @@ export default function MoreEdit( {
width: `${ ( customText ? customText : DEFAULT_TEXT ).length + 1.2 }em`,
};

const dropdownMenuProps = useToolsPanelDropdownMenuProps();

return (
<>
<InspectorControls>
Expand All @@ -51,6 +57,7 @@ export default function MoreEdit( {
noTeaser: false,
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
label={ __( 'Hide excerpt' ) }
Expand Down

1 comment on commit 5a59c03

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 5a59c03.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12468627838
📝 Reported issues:

Please sign in to comment.