PluginMoreMenuItem
implementation does not render MenuItem
as expected
#39474
Labels
[Feature] Extensibility
The ability to extend blocks or the editing experience
Description
Using the following implementation - I expect the plugin menu item to be rendered as a
MenuItem
as indicated in the docs for the props.other declaration. Unfortunately, this approach is rendering only a basicButton
dom element which seems to be the default for theActionItem
component.I've found an alternate route that allows us to insert MenuItem components using the following:
By being able to use the
MenuItem
we gain the benefits of existing work done to handle aria attributes for example among other benefits such as styling consistency.Here are a few helpful links to the related codebase.
gutenberg/packages/edit-post/src/components/header/plugin-more-menu-item/index.js
Lines 66 to 69 in 8001881
gutenberg/packages/interface/src/components/complementary-area-more-menu-item/index.js
Lines 18 to 28 in 58d74b6
Step-by-step reproduction instructions
This is a code related bug and is reproducible with the following example code
Screenshots, screen recording, code snippet
Environment info
WP 5.9.2
GB N/A
CoBlocks 2.22.4
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: