mirror of https://github.com/hashicorp/consul
ui: Use InformedAction for intention confirmation dialogs (#9398)
parent
57899ba5ef
commit
9f07871971
|
@ -66,24 +66,36 @@ as |item index|>
|
||||||
<li role="none" class="dangerous">
|
<li role="none" class="dangerous">
|
||||||
<label for={{confirm}} role="menuitem" tabindex="-1" onkeypress={{keypressClick}} data-test-delete>Delete</label>
|
<label for={{confirm}} role="menuitem" tabindex="-1" onkeypress={{keypressClick}} data-test-delete>Delete</label>
|
||||||
<div role="menu">
|
<div role="menu">
|
||||||
<div class="confirmation-alert warning">
|
<InformedAction
|
||||||
<div>
|
class="warning"
|
||||||
<header>
|
>
|
||||||
Confirm Delete
|
<:header>
|
||||||
</header>
|
Confirm Delete
|
||||||
|
</:header>
|
||||||
|
<:body>
|
||||||
<p>
|
<p>
|
||||||
Are you sure you want to delete this intention?
|
Are you sure you want to delete this intention?
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</:body>
|
||||||
<ul>
|
<:actions as |Actions|>
|
||||||
<li class="dangerous">
|
<Actions.Action class="dangerous">
|
||||||
<button tabindex="-1" type="button" class="type-delete" onclick={{queue (action change) (action @delete item)}}>Delete</button>
|
<Action
|
||||||
</li>
|
class="type-delete"
|
||||||
<li>
|
tabindex="-1"
|
||||||
<label for={{confirm}}>Cancel</label>
|
{{on 'click' (queue (action change) (action @delete item))}}
|
||||||
</li>
|
>
|
||||||
</ul>
|
Delete
|
||||||
</div>
|
</Action>
|
||||||
|
</Actions.Action>
|
||||||
|
<Actions.Action>
|
||||||
|
<Action
|
||||||
|
@for={{confirm}}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Action>
|
||||||
|
</Actions.Action>
|
||||||
|
</:actions>
|
||||||
|
</InformedAction>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
Loading…
Reference in New Issue