2019-04-03 21:06:20 +00:00
<!-- THIS FILE IS AUTO GENERATED. This file is generated from JSDoc comments in app/components/confirm - action.js. To make changes, first edit that file and run "yarn gen - story - md confirm - action" to re - generate the content. -->
## ConfirmAction
2019-08-27 22:50:53 +00:00
`ConfirmAction` is a button followed by a pop up confirmation message and button used to prevent users from performing actions they do not intend to.
2019-04-03 21:06:20 +00:00
**Properties**
2019-05-21 00:10:42 +00:00
| Param | Type | Default | Description |
2019-04-03 21:06:20 +00:00
| --- | --- | --- | --- |
2019-05-21 00:10:42 +00:00
| buttonClasses | < code > String< / code > | < code > < / code > | The CSS classes to add to the trigger button. |
| confirmTitle | < code > String< / code > | < code > Delete this?< / code > | The title to display upon confirming. |
| confirmMessage | < code > String< / code > | < code > You will not be able to recover it later.< / code > | The message to display upon confirming. |
| confirmButtonText | < code > String< / code > | < code > Delete< / code > | The confirm button text. |
| cancelButtonText | < code > String< / code > | < code > Cancel< / code > | The cancel button text. |
2019-04-03 21:06:20 +00:00
| onConfirmAction | < code > Func< / code > | < code > < / code > | The action to take upon confirming. |
**Example**
2019-05-21 00:10:42 +00:00
2019-04-03 21:06:20 +00:00
```js
< ConfirmAction
2019-05-21 00:10:42 +00:00
@buttonClasses ="button is-primary"
2019-04-03 21:06:20 +00:00
@onConfirmAction ={{ () => { console.log('Action!') } }}
Delete
< / ConfirmAction >
```
2019-05-21 00:10:42 +00:00
2019-04-03 21:06:20 +00:00
**See**
- [Uses of ConfirmAction ](https://github.com/hashicorp/vault/search?l=Handlebars&q=ConfirmAction )
2022-02-17 19:30:56 +00:00
- [ConfirmAction Source Code ](https://github.com/hashicorp/vault/blob/main/ui/lib/core/addon/components/confirm-action.js )
2019-04-03 21:06:20 +00:00
---