Skip to content

Commit

Permalink
Update packages/module/patternfly-docs/content/extensions/chatbot/exa…
Browse files Browse the repository at this point in the history
…mples/Messages/Messages.md

Co-authored-by: Erin Donehoo <[email protected]>
  • Loading branch information
rebeccaalpert and edonehoo authored Dec 13, 2024
1 parent ef0b576 commit 26e9dab
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,17 @@ You can add actions to a message, to allow users to interact with the message co

### Custom message actions

Beyond the standard message actions (positive, negative, copy, share, or listen), you can add custom actions to a bot message by passing an `actions` object to the `<Message>` component. This object can contain the following customizations: `ariaLabel`, `clickedAriaLabel`, `onClick`, `className`, `isDisabled`, `tooltipContent`, `tooltipContent`, `tooltipProps`, and `icon`. `clickedAriaLabel` and `clickedTooltipContent` are applied only when a button is clicked. If `clickedAriaLabel` or `clickedTooltipContent` are omitted, they will default to the `ariaLabel` or `tooltipContent` supplied.
Beyond the standard message actions (good response, bad response, copy, share, or listen), you can add custom actions to a bot message by passing an `actions` object to the `<Message>` component. This object can contain the following customizations:
- `ariaLabel`
- `onClick`
- `className`
- `isDisabled`
- `tooltipContent`
- `tooltipContent`
- `tooltipProps`
- `icon`

You can apply a `clickedAriaLabel` and `clickedTooltipContent` once a button is clicked. If either of these props are omitted, their values will default to the `ariaLabel` or `tooltipContent` supplied.

```js file="./MessageWithCustomResponseActions.tsx"

Expand Down

0 comments on commit 26e9dab

Please sign in to comment.