You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To be called when the user clicks the menu item.
74
-
};
75
-
76
-
constMyPluginBlockSettingsMenuItem= () => (
77
-
<PluginBlockSettingsMenuItem
78
-
allowedBlocks={ [ 'core/paragraph' ] }
79
-
icon="dashicon-name"
80
-
label={ __( 'Menu item text' ) }
81
-
onClick={ doOnClick }
82
-
/>
83
-
);
84
-
```
85
-
86
-
_Parameters_
87
-
88
-
-_props_`Object`: Component props.
89
-
-_props.allowedBlocks_`[Array]`: An array containing a list of block names for which the item should be shown. If not present, it'll be rendered for any block. If multiple blocks are selected, it'll be shown if and only if all of them are in the allowed list.
90
-
-_props.icon_`[WPBlockTypeIconRender]`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.
91
-
-_props.label_`string`: The menu item text.
92
-
-_props.onClick_`Function`: Callback function to be executed when the user click the menu item.
93
-
-_props.small_`[boolean]`: Whether to render the label or not.
94
-
-_props.role_`[string]`: The ARIA role for the menu item.
0 commit comments