diff --git a/packages/block-library/src/navigation-submenu/edit.js b/packages/block-library/src/navigation-submenu/edit.js
index c89eadf1cb589e..dbdbd23b13b2f6 100644
--- a/packages/block-library/src/navigation-submenu/edit.js
+++ b/packages/block-library/src/navigation-submenu/edit.js
@@ -8,11 +8,12 @@ import clsx from 'clsx';
*/
import { useSelect, useDispatch } from '@wordpress/data';
import {
- PanelBody,
TextControl,
TextareaControl,
ToolbarButton,
ToolbarGroup,
+ __experimentalToolsPanel as ToolsPanel,
+ __experimentalToolsPanelItem as ToolsPanelItem,
} from '@wordpress/components';
import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
import { __ } from '@wordpress/i18n';
@@ -382,67 +383,119 @@ export default function NavigationSubmenuEdit( {
{ /* Warning, this duplicated in packages/block-library/src/navigation-link/edit.js */ }
-
- {
- setAttributes( { label: labelValue } );
- } }
+ {
+ setAttributes( {
+ label: '',
+ url: '',
+ description: '',
+ title: '',
+ rel: '',
+ } );
+ } }
+ >
+
- {
- setAttributes( { url: urlValue } );
- } }
+ isShownByDefault
+ hasValue={ () => !! label }
+ onDeselect={ () => setAttributes( { label: '' } ) }
+ >
+ {
+ setAttributes( { label: labelValue } );
+ } }
+ label={ __( 'Text' ) }
+ autoComplete="off"
+ />
+
+
+
- {
- setAttributes( {
- description: descriptionValue,
- } );
- } }
+ isShownByDefault
+ hasValue={ () => !! url }
+ onDeselect={ () => setAttributes( { url: '' } ) }
+ >
+ {
+ setAttributes( { url: urlValue } );
+ } }
+ label={ __( 'Link' ) }
+ autoComplete="off"
+ />
+
+
+
- {
- setAttributes( { title: titleValue } );
- } }
+ isShownByDefault
+ hasValue={ () => !! description }
+ onDeselect={ () =>
+ setAttributes( { description: '' } )
+ }
+ >
+ {
+ setAttributes( {
+ description: descriptionValue,
+ } );
+ } }
+ label={ __( 'Description' ) }
+ help={ __(
+ 'The description will be displayed in the menu if the current theme supports it.'
+ ) }
+ />
+
+
+
- {
- setAttributes( { rel: relValue } );
- } }
+ isShownByDefault
+ hasValue={ () => !! title }
+ onDeselect={ () => setAttributes( { title: '' } ) }
+ >
+ {
+ setAttributes( { title: titleValue } );
+ } }
+ label={ __( 'Title attribute' ) }
+ autoComplete="off"
+ help={ __(
+ 'Additional information to help clarify the purpose of the link.'
+ ) }
+ />
+
+
+
-
+ isShownByDefault
+ hasValue={ () => !! rel }
+ onDeselect={ () => setAttributes( { rel: '' } ) }
+ >
+ {
+ setAttributes( { rel: relValue } );
+ } }
+ label={ __( 'Rel attribute' ) }
+ autoComplete="off"
+ help={ __(
+ 'The relationship of the linked URL as space-separated link types.'
+ ) }
+ />
+
+
{ /* eslint-disable jsx-a11y/anchor-is-valid */ }