+
+ { convertDescription }
+
+
+
+
+
+
+ );
+}
diff --git a/packages/block-library/src/page-list/edit.js b/packages/block-library/src/page-list/edit.js
index 6b525960db2246..876496686929a3 100644
--- a/packages/block-library/src/page-list/edit.js
+++ b/packages/block-library/src/page-list/edit.js
@@ -23,7 +23,6 @@ import {
Notice,
ComboboxControl,
Button,
- Modal,
} from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
import { useMemo, useState, useEffect } from '@wordpress/element';
@@ -34,16 +33,15 @@ import { useSelect } from '@wordpress/data';
* Internal dependencies
*/
import { useConvertToNavigationLinks } from './use-convert-to-navigation-links';
+import {
+ convertDescription,
+ ConvertToLinksModal,
+} from './convert-to-links-modal';
// We only show the edit option when page count is <= MAX_PAGE_COUNT
// Performance of Navigation Links is not good past this value.
const MAX_PAGE_COUNT = 100;
const NOOP = () => {};
-
-const convertDescription = __(
- 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.'
-);
-
function BlockContent( {
blockProps,
innerBlocksProps,
@@ -113,7 +111,7 @@ function BlockContent( {
}
}
-function ConvertToLinksModal( { onClick, disabled } ) {
+function ConvertToLinks( { onClick, disabled } ) {
const [ isOpen, setOpen ] = useState( false );
const openModal = () => setOpen( true );
const closeModal = () => setOpen( false );
@@ -126,30 +124,11 @@ function ConvertToLinksModal( { onClick, disabled } ) {
{ isOpen && (
-