Class connector for adding button to post

If you want to add a button to the post menu then you’ll need something a little bit different since posts are widgets.

You would need to add something like this to your theme / plugin.

api.addPostMenuButton("my-button", () => {
  return {
    action: "someAction",
    icon: "someIcon",
    className: "someClass",
    title: "some title",

The plugin API has a method for adding new buttons that makes this relatively easy.

This theme component uses that method to add a new button to that menu based on some conditions and defines a new action, so have a look here