diff --git a/packages/block-library/src/navigation-link/transforms.js b/packages/block-library/src/navigation-link/transforms.js index fb450a13a02dc..ff38589b92687 100644 --- a/packages/block-library/src/navigation-link/transforms.js +++ b/packages/block-library/src/navigation-link/transforms.js @@ -47,6 +47,13 @@ const transforms = { return createBlock( 'core/navigation-link' ); }, }, + { + type: 'block', + blocks: [ 'core/buttons' ], + transform: () => { + return createBlock( 'core/navigation-link' ); + }, + }, ], to: [ { @@ -105,6 +112,21 @@ const transforms = { return createBlock( 'core/page-list' ); }, }, + { + type: 'block', + blocks: [ 'core/buttons' ], + transform: ( { label, url, rel, title, opensInNewTab } ) => { + return createBlock( 'core/buttons', {}, [ + createBlock( 'core/button', { + text: label, + url, + rel, + title, + linkTarget: opensInNewTab ? '_blank' : undefined, + } ), + ] ); + }, + }, ], }; diff --git a/packages/block-library/src/navigation/constants.js b/packages/block-library/src/navigation/constants.js index 07d71d50dd98c..21fc8bfdfb74d 100644 --- a/packages/block-library/src/navigation/constants.js +++ b/packages/block-library/src/navigation/constants.js @@ -13,6 +13,7 @@ export const ALLOWED_BLOCKS = [ 'core/site-logo', 'core/navigation-submenu', 'core/loginout', + 'core/buttons', ]; export const PRIORITIZED_INSERTER_BLOCKS = [