open-vault/ui/stories/confirm-action.md
Joshua Ogle 5c5a33f6df
UI: Add Toolbar to Storybook (#6761)
* Add Toolbar stories
* Update ConfirmAction story
2019-05-20 18:10:42 -06:00

1.5 KiB

ConfirmAction

ConfirmAction is a button followed by a confirmation message and button used to prevent users from performing actions they do not intend to.

Properties

Param Type Default Description
buttonClasses String The CSS classes to add to the trigger button.
confirmTitle String Delete this? The title to display upon confirming.
confirmMessage String You will not be able to recover it later. The message to display upon confirming.
confirmButtonText String Delete The confirm button text.
cancelButtonText String Cancel The cancel button text.
onConfirmAction Func The action to take upon confirming.

Example

<ConfirmAction
  @buttonClasses="button is-primary"
  @onConfirmAction={{ () => { console.log('Action!') } }}
  Delete
</ConfirmAction>

See