Skip to content

Commit

Permalink
Navigation: Hide's the renants of the inner blocks in the navigation …
Browse files Browse the repository at this point in the history
…link block
  • Loading branch information
Ben Dwyer committed Jan 5, 2023
1 parent 357dd40 commit eb05095
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,19 @@ export default function NavigationLinkEdit( {
const DEFAULT_BLOCK = {
name: 'core/navigation-link',
};
const innerBlocksProps = useInnerBlocksProps( blockProps, {
allowedBlocks: ALLOWED_BLOCKS,
__experimentalDefaultBlock: DEFAULT_BLOCK,
__experimentalDirectInsert: true,
renderAppender: false,
} );

const innerBlocksProps = useInnerBlocksProps(
{
...blockProps,
className: 'remove-outline', // Remove the outline from the inner blocks container.
},
{
allowedBlocks: ALLOWED_BLOCKS,
__experimentalDefaultBlock: DEFAULT_BLOCK,
__experimentalDirectInsert: true,
renderAppender: false,
}
);

if ( ! url || isInvalid || isDraft ) {
blockProps.onClick = () => setIsLinkOpen( true );
Expand Down

0 comments on commit eb05095

Please sign in to comment.