DEV: Correct addPostAdminMenuButton docs (#24035)

The `name` argument doesn't do anything, and 'title' should actually be 'label'
This commit is contained in:
David Taylor 2023-10-20 14:12:27 +01:00 committed by GitHub
parent 0cfc42e0e6
commit 373b2ca362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -642,22 +642,22 @@ class PluginApi {
* Example:
*
* ```
* api.addPostAdminMenuButton((name, attrs) => {
* api.addPostAdminMenuButton((post) => {
* return {
* action: () => {
* alert('You clicked on the coffee button!');
* },
* icon: 'coffee',
* className: 'hot-coffee',
* title: 'coffee.title',
* label: 'coffee.title',
* };
* });
* ```
**/
addPostAdminMenuButton(name, callback) {
addPostAdminMenuButton(callback) {
this.container
.lookup("service:admin-post-menu-buttons")
.addButton(name, callback);
.addButton(callback);
}
/**