-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove container tag for ConfirmAction
- Loading branch information
1 parent
e03ce83
commit 9ed84e7
Showing
7 changed files
with
62 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 53 additions & 44 deletions
97
ui/lib/core/addon/templates/components/confirm-action.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,55 @@ | ||
{{#basic-dropdown class="popup-menu" horizontalPosition=horizontalPosition verticalPosition=verticalPosition onOpen=(action "toggleConfirm") onClose=(action "toggleConfirm") as |d|}} | ||
{{#d.trigger | ||
tagName="button" | ||
type="button" | ||
class=(concat buttonClasses " popup-menu-trigger" (if d.isOpen " is-active")) | ||
disabled=disabled | ||
data-test-confirm-action-trigger="true" | ||
}} | ||
{{yield}} | ||
{{#if (eq buttonClasses 'toolbar-link')}} | ||
<Chevron @direction={{if showConfirm 'up' 'down'}} /> | ||
{{/if}} | ||
{{/d.trigger}} | ||
{{#d.content class=(concat "popup-menu-content")}} | ||
<div class="box confirm-action-message"> | ||
<div class="message is-highlight"> | ||
<div class="message-title"> | ||
<Icon @glyph="alert-triangle" /> | ||
{{if disabled disabledTitle confirmTitle}} | ||
<div class="confirm-action" ...attributes> | ||
<BasicDropdown | ||
@horizontalPosition={{horizontalPosition}} | ||
@verticalPosition={{verticalPosition}} | ||
@onOpen={{action "toggleConfirm"}} | ||
@onClose={{action "toggleConfirm"}} | ||
as |d|> | ||
<d.trigger | ||
@tagName="button" | ||
class={{concat buttonClasses " popup-menu-trigger" (if d.isOpen " is-active")}} | ||
type="button" | ||
disabled={{disabled}} | ||
data-test-confirm-action-trigger="true" | ||
> | ||
{{yield}} | ||
{{#if (eq buttonClasses 'toolbar-link')}} | ||
<Chevron @direction={{if showConfirm 'up' 'down'}} /> | ||
{{/if}} | ||
</d.trigger> | ||
<d.content | ||
@class="popup-menu-content" | ||
> | ||
<div class="box confirm-action-message"> | ||
<div class="message is-highlight"> | ||
<div class="message-title"> | ||
<Icon @glyph="alert-triangle" /> | ||
{{if disabled disabledTitle confirmTitle}} | ||
</div> | ||
<p> | ||
{{if disabled disabledMessage confirmMessage}} | ||
</p> | ||
</div> | ||
<div class="confirm-action-options"> | ||
<button | ||
type="button" | ||
disabled={{disabled}} | ||
class="link is-destroy" | ||
data-test-confirm-button="true" | ||
{{action 'onConfirm'}} | ||
> | ||
{{confirmButtonText}} | ||
</button> | ||
<button | ||
type="button" | ||
class="link" | ||
data-test-confirm-cancel-button="true" | ||
{{action d.actions.close}} | ||
> | ||
{{cancelButtonText}} | ||
</button> | ||
</div> | ||
<p> | ||
{{if disabled disabledMessage confirmMessage}} | ||
</p> | ||
</div> | ||
<div class="confirm-action-options"> | ||
<button | ||
type="button" | ||
disabled={{disabled}} | ||
class="link is-destroy" | ||
data-test-confirm-button="true" | ||
{{action 'onConfirm'}} | ||
> | ||
{{confirmButtonText}} | ||
</button> | ||
<button | ||
type="button" | ||
class="link" | ||
data-test-confirm-cancel-button="true" | ||
{{action d.actions.close}} | ||
> | ||
{{cancelButtonText}} | ||
</button> | ||
</div> | ||
</div> | ||
{{/d.content}} | ||
{{/basic-dropdown}} | ||
</d.content> | ||
</BasicDropdown> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters