diff --git a/packages/block-editor/src/components/block-navigation/list.js b/packages/block-editor/src/components/block-navigation/list.js index f46e43372b315d..f664592916b83f 100644 --- a/packages/block-editor/src/components/block-navigation/list.js +++ b/packages/block-editor/src/components/block-navigation/list.js @@ -7,22 +7,24 @@ import { isNil, map, omitBy } from 'lodash'; * WordPress dependencies */ import { Slot, Fill } from '@wordpress/components'; -import { Children, cloneElement } from '@wordpress/element'; +import { Children, cloneElement, useContext } from '@wordpress/element'; /** * Internal dependencies */ import ListItem from './list-item'; import ButtonBlockAppender from '../button-block-appender'; +import { BlockListBlockContext } from '../block-list/block'; const listItemSlotName = ( blockId ) => `BlockNavigationList-item-${ blockId }`; export const ListItemSlot = ( { blockId, ...props } ) => ( ); -export const ListItemFill = ( { blockId, ...props } ) => ( - -); +export const ListItemFill = ( props ) => { + const { clientId } = useContext( BlockListBlockContext ); + return ; +}; export default function BlockNavigationList( { blocks, diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index 44efb40776a294..d9cc963e82d9e3 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -52,7 +52,6 @@ const noop = () => {}; function NavigationLinkEdit( { attributes, - clientId, hasDescendants, isSelected, isParentOfSelectedBlock, @@ -223,7 +222,7 @@ function NavigationLinkEdit( { /> - +