Skip to content

Commit

Permalink
Minor fixes for buttons docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
vkublytskyi committed Nov 21, 2023
1 parent 93bc2f2 commit f15e4ed
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
27 changes: 24 additions & 3 deletions src/pages/services/aem-cf-console-admin/api/action-bar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ const guestConnection = await register({
});
```

The callback is invoked when user clicks on the button and receives list of content fragments selected in the list.

## Custom button with sub menu

```js
Expand All @@ -117,9 +119,28 @@ const guestConnection = await register({

The callback is invoked when user clicks on the button and receives list of content fragments selected in the list.

<InlineAlert variant="warning" slots="text" />
## Delete button

```js
import { register } from "@adobe/uix-guest";

The `getButton` method is deprecated. When defining a single button, use `getButtons` and provide a single-item array.
// ...

const guestConnection = await register({
id: "my.company.extension-with-header-menu-button",
methods: {
actionBar: {
deleteButtons() {
return [
{
id: "my.company.export-button"
},
];
},
},
},
});
```

## API Reference

Expand All @@ -146,4 +167,4 @@ The `getButton` method is deprecated. When defining a single button, use `getBut

| Field | Type | Required | Description |
|----------|-----------------------------------------------------------------------------| ------ |------------------------------------------------------------------------------|
| id | `string` | ✔️ | "id" is a "data-id" attribute of the button. (Use browser developer console) |
| id | `string` | ✔️ | "id" is a "data-id" attribute of the button (please use browser developer console to find actual value). |
13 changes: 5 additions & 8 deletions src/pages/services/aem-cf-console-admin/api/header-menu/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const guestConnection = await register({
});
```

The `onClick` callback is invoked when a user clicks on the button. It does not receive any arguments.

## Custom button with sub menu

```js
Expand Down Expand Up @@ -92,6 +94,8 @@ const guestConnection = await register({
});
```

The `onClick` callback is invoked when a user clicks on the button. It does not receive any arguments.

## Delete button

```js
Expand All @@ -115,13 +119,6 @@ const guestConnection = await register({
});
```


The `onClick` callback is invoked when a user clicks on the button. It does not receive any arguments.

<InlineAlert variant="warning" slots="text" />

The `getButton` method is deprecated. When defining a single button, use `getButtons` and provide a single-item array.

## API Reference

### Button API
Expand All @@ -148,4 +145,4 @@ The `getButton` method is deprecated. When defining a single button, use `getBut

| Field | Type | Required | Description |
|----------|-----------------------------------------------------------------------------| ------ |------------------------------------------------------------------------------|
| id | `string` | ✔️ | "id" is a "data-id" attribute of the button. (Use browser developer console) |
| id | `string` | ✔️ | "id" is a "data-id" attribute of the button (please use browser developer console to find actual value). |

0 comments on commit f15e4ed

Please sign in to comment.