diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js
index 319b7f3736a3c6..0a24063716fe0a 100644
--- a/packages/block-library/src/navigation/edit/index.js
+++ b/packages/block-library/src/navigation/edit/index.js
@@ -20,11 +20,12 @@ import {
__experimentalUseHasRecursion as useHasRecursion,
store as blockEditorStore,
withColors,
- PanelColorSettings,
ContrastChecker,
getColorClassName,
Warning,
+ __experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,
__experimentalUseBlockOverlayActive as useBlockOverlayActive,
+ __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
} from '@wordpress/block-editor';
import { EntityProvider, store as coreStore } from '@wordpress/core-data';
@@ -529,144 +530,157 @@ function Navigation( {
} );
}, [ isDraftNavigationMenu, navigationMenu ] );
+ const colorGradientSettings = useMultipleOriginColorsAndGradients();
const stylingInspectorControls = (
-
- { hasSubmenuIndicatorSetting && (
-
- { isResponsive && (
- <>
-
- { overlayMenuPreview && (
-
- ) }
- >
- ) }
- { __( 'Overlay Menu' ) }
-
) }
- onChange={ ( value ) =>
- setAttributes( { overlayMenu: value } )
- }
- isBlock
- hideLabelFromVision
- >
-
-
-
-
- { hasSubmenus && (
- <>
- { __( 'Submenus' ) }
- {
- setAttributes( {
- openSubmenusOnClick: value,
- ...( value && {
- showSubmenuIcon: true,
- } ), // Make sure arrows are shown when we toggle this on.
- } );
- } }
- label={ __( 'Open on click' ) }
- />
-
- {
- setAttributes( {
- showSubmenuIcon: value,
- } );
- } }
- disabled={ attributes.openSubmenusOnClick }
- label={ __( 'Show arrow' ) }
+ { __( 'Overlay Menu' ) }
+
+ setAttributes( { overlayMenu: value } )
+ }
+ isBlock
+ hideLabelFromVision
+ >
+
- >
- ) }
-
- ) }
- { hasColorSettings && (
-
- { enableContrastChecking && (
- <>
-
-
- >
- ) }
-
- ) }
-
+
+ { hasSubmenus && (
+ <>
+
{ __( 'Submenus' ) }
+ {
+ setAttributes( {
+ openSubmenusOnClick: value,
+ ...( value && {
+ showSubmenuIcon: true,
+ } ), // Make sure arrows are shown when we toggle this on.
+ } );
+ } }
+ label={ __( 'Open on click' ) }
+ />
+
+ {
+ setAttributes( {
+ showSubmenuIcon: value,
+ } );
+ } }
+ disabled={ attributes.openSubmenusOnClick }
+ label={ __( 'Show arrow' ) }
+ />
+ >
+ ) }
+
+ ) }
+
+
+ { hasColorSettings && (
+ <>
+ setTextColor(),
+ },
+ {
+ colorValue: backgroundColor.color,
+ label: __( 'Background' ),
+ onColorChange: setBackgroundColor,
+ resetAllFilter: () => setBackgroundColor(),
+ },
+ {
+ colorValue: overlayTextColor.color,
+ label: __( 'Submenu & overlay text' ),
+ onColorChange: setOverlayTextColor,
+ resetAllFilter: () => setOverlayTextColor(),
+ },
+ {
+ colorValue: overlayBackgroundColor.color,
+ label: __( 'Submenu & overlay background' ),
+ onColorChange: setOverlayBackgroundColor,
+ resetAllFilter: () =>
+ setOverlayBackgroundColor(),
+ },
+ ] }
+ panelId={ clientId }
+ { ...colorGradientSettings }
+ gradients={ [] }
+ disableCustomGradients={ true }
+ />
+ { enableContrastChecking && (
+ <>
+
+
+ >
+ ) }
+ >
+ ) }
+
+ >
);
// If the block has inner blocks, but no menu id, then these blocks are either: