Add triggerClass support to the popover menu

This commit is contained in:
Michael Lange 2019-11-11 17:05:25 -08:00
parent ada745a59f
commit d13af1bcb5
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,8 @@ const FOCUSABLE = [
export default Component.extend({
classnames: ['popover'],
triggerClass: '',
isOpen: false,
dropdown: null,

View file

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