From 61777ea946cf0ceb79ecf8a0174d690a9a90c656 Mon Sep 17 00:00:00 2001 From: AnthonyLedesma Date: Wed, 16 Mar 2022 13:07:56 -0700 Subject: [PATCH 1/2] add default as prop --- .../src/components/header/plugin-more-menu-item/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/edit-post/src/components/header/plugin-more-menu-item/index.js b/packages/edit-post/src/components/header/plugin-more-menu-item/index.js index 6725ef95185548..6e8c4daa24d461 100644 --- a/packages/edit-post/src/components/header/plugin-more-menu-item/index.js +++ b/packages/edit-post/src/components/header/plugin-more-menu-item/index.js @@ -3,6 +3,7 @@ */ import { ActionItem } from '@wordpress/interface'; import { compose } from '@wordpress/compose'; +import { MenuItem } from '@wordpress/components'; import { withPluginContext } from '@wordpress/plugins'; /** @@ -64,6 +65,7 @@ import { withPluginContext } from '@wordpress/plugins'; export default compose( withPluginContext( ( context, ownProps ) => { return { + as: ownProps.as ?? MenuItem, icon: ownProps.icon || context.icon, name: 'core/edit-post/plugin-more-menu', }; From 558e259a46e8cc6314e7333e98eca1359c49f1d0 Mon Sep 17 00:00:00 2001 From: AnthonyLedesma Date: Thu, 17 Mar 2022 12:25:36 -0700 Subject: [PATCH 2/2] also update edit-site package --- .../src/components/header/plugin-more-menu-item/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/edit-site/src/components/header/plugin-more-menu-item/index.js b/packages/edit-site/src/components/header/plugin-more-menu-item/index.js index 1c9707074f90f4..e507b1bf2fbc59 100644 --- a/packages/edit-site/src/components/header/plugin-more-menu-item/index.js +++ b/packages/edit-site/src/components/header/plugin-more-menu-item/index.js @@ -3,6 +3,7 @@ */ import { ActionItem } from '@wordpress/interface'; import { compose } from '@wordpress/compose'; +import { MenuItem } from '@wordpress/components'; import { withPluginContext } from '@wordpress/plugins'; /** @@ -64,6 +65,7 @@ import { withPluginContext } from '@wordpress/plugins'; export default compose( withPluginContext( ( context, ownProps ) => { return { + as: ownProps.as ?? MenuItem, icon: ownProps.icon || context.icon, name: 'core/edit-site/plugin-more-menu', };