Skip to content

Commit

Permalink
Site Title Block: Add dropdown menu props to ToolsPanel component (#6…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukhendu2002 authored Dec 20, 2024
1 parent ad073b0 commit 6dfea11
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/block-library/src/site-title/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ import {
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
import { decodeEntities } from '@wordpress/html-entities';

/**
* Internal dependencies
*/
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';

export default function SiteTitleEdit( {
attributes,
setAttributes,
Expand All @@ -47,6 +52,7 @@ export default function SiteTitleEdit( {
};
}, [] );
const { editEntityRecord } = useDispatch( coreStore );
const dropdownMenuProps = useToolsPanelDropdownMenuProps();

function setTitle( newTitle ) {
editEntityRecord( 'root', 'site', undefined, {
Expand Down Expand Up @@ -121,6 +127,7 @@ export default function SiteTitleEdit( {
linkTarget: '_self',
} );
} }
dropdownMenuProps={ dropdownMenuProps }
>
<ToolsPanelItem
hasValue={ () => isLink !== false }
Expand Down

1 comment on commit 6dfea11

@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 6dfea11.
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/12425115174
📝 Reported issues:

Please sign in to comment.