Hi!
You can use addPostMenuButton
api.addPostMenuButton('coffee', () => {
return {
action: 'drinkCoffee',
icon: 'coffee',
className: 'hot-coffee',
title: 'coffee.title',
position: 'first' // can be `first`, `last` or `second-last-hidden`
};
});
Then you can add your action this way:
api.attachWidgetAction("post", "drinkCoffee", function () {
//
}
EDIT: Got Lillian’d . It would also be a good idea to follow the guides Lilly posted!