open-nomad/ui/app/templates/components/popover-menu.hbs

19 lines
608 B
Handlebars

<BasicDropdown
@horizontalPosition="right"
@disabled={{isDisabled}}
@onOpen={{action (queue (action (mut isOpen) true) (action capture))}}
@onClose={{action (mut isOpen) false}} as |dd|
>
<dd.Trigger
data-test-popover-trigger
class={{concat "popover-trigger button is-primary " triggerClass (if isDisabled " is-disabled")}}
aria-label={{tooltip}}
{{on "keydown" (action "openOnArrowDown" dd)}}
>
{{label}} {{x-icon "chevron-down" class="is-text"}}
</dd.Trigger>
<dd.Content data-test-popover-menu class="popover-content">
{{yield dd}}
</dd.Content>
</BasicDropdown>