Skip to content

Commit

Permalink
Add Tools Panel dropdown menu props to More block
Browse files Browse the repository at this point in the history
  • Loading branch information
Infinite-Null committed Dec 17, 2024
1 parent 581de9f commit fe97bc9
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

0 comments on commit fe97bc9

Please sign in to comment.