diff --git a/packages/block-library/src/navigation/block.json b/packages/block-library/src/navigation/block.json index b54da128bd86e..eb7f47c7c7b0e 100644 --- a/packages/block-library/src/navigation/block.json +++ b/packages/block-library/src/navigation/block.json @@ -71,6 +71,10 @@ "templateLock": { "type": [ "string", "boolean" ], "enum": [ "all", "insert", "contentOnly", false ] + }, + "mobileBreakpoint": { + "type": "string", + "default": "782px" } }, "providesContext": { diff --git a/packages/block-library/src/navigation/edit/index.js b/packages/block-library/src/navigation/edit/index.js index 918b609f92a0e..a315e23e96afe 100644 --- a/packages/block-library/src/navigation/edit/index.js +++ b/packages/block-library/src/navigation/edit/index.js @@ -29,6 +29,7 @@ import { ToggleControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption, + __experimentalInputControl as InputControl, Button, Spinner, } from '@wordpress/components'; @@ -94,6 +95,7 @@ function Navigation( { } = {}, hasIcon, icon = 'handle', + mobileBreakpoint, } = attributes; const ref = attributes.ref; @@ -561,6 +563,15 @@ function Navigation( { label={ __( 'Always' ) } /> + + + setAttributes( { + mobileBreakpoint: nextValue, + } ) + } + /> { hasSubmenus && ( <>

{ __( 'Submenus' ) }

@@ -701,6 +712,7 @@ function Navigation( { isHiddenByDefault={ 'always' === overlayMenu } overlayBackgroundColor={ overlayBackgroundColor } overlayTextColor={ overlayTextColor } + mobileBreakpoint={ mobileBreakpoint } > { isEntityAvailable && (