mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
37 lines
1017 B
Handlebars
37 lines
1017 B
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
~}}
|
|
|
|
{{#if @isInDropdown}}
|
|
{{! Hds component renders <li> and <button> elements }}
|
|
<Hds::Dropdown::ListItem::Interactive
|
|
data-test-confirm-action-trigger
|
|
@text={{@buttonText}}
|
|
@color="critical"
|
|
{{on "click" (fn (mut this.showConfirmModal) true)}}
|
|
...attributes
|
|
{{! remove class when dropdown/popup menus are replaced with Hds::Dropdown }}
|
|
class="hds-confirm-action-critical"
|
|
/>
|
|
{{else}}
|
|
<Hds::Button
|
|
data-test-confirm-action-trigger
|
|
@text={{@buttonText}}
|
|
@color={{@buttonColor}}
|
|
{{on "click" (fn (mut this.showConfirmModal) true)}}
|
|
...attributes
|
|
/>
|
|
{{/if}}
|
|
|
|
{{#if this.showConfirmModal}}
|
|
<ConfirmModal
|
|
@color={{this.modalColor}}
|
|
@onClose={{fn (mut this.showConfirmModal) false}}
|
|
@onConfirm={{this.onConfirm}}
|
|
@confirmTitle={{@confirmTitle}}
|
|
@confirmMessage={{this.confirmMessage}}
|
|
@disabledMessage={{@disabledMessage}}
|
|
@isRunning={{@isRunning}}
|
|
/>
|
|
{{/if}} |