2020-05-11 14:04:27 +00:00
|
|
|
<div class="popover-select" ...attributes>
|
2020-08-10 08:26:02 +00:00
|
|
|
<PopoverMenu as |components menu|>
|
2020-05-11 14:04:27 +00:00
|
|
|
<BlockSlot @name="trigger">
|
|
|
|
<span>
|
|
|
|
{{selected.value}}
|
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
2020-08-10 08:26:02 +00:00
|
|
|
<BlockSlot @name="menu">
|
|
|
|
{{#let components.MenuItem components.MenuSeparator as |MenuItem MenuSeparator|}}
|
|
|
|
<MenuSeparator>
|
|
|
|
<BlockSlot @name="label">
|
|
|
|
{{title}}
|
|
|
|
</BlockSlot>
|
|
|
|
</MenuSeparator>
|
|
|
|
{{#each options as |option|}}
|
|
|
|
<MenuItem
|
|
|
|
class={{if (eq selected.key option.key) 'is-active'}}
|
|
|
|
@onclick={{action (queue (action 'change' option) (if multiple (noop) menu.toggle))}}
|
|
|
|
>
|
|
|
|
<BlockSlot @name="label">
|
|
|
|
{{option.value}}
|
|
|
|
</BlockSlot>
|
|
|
|
</MenuItem>
|
|
|
|
{{/each}}
|
|
|
|
{{/let}}
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</PopoverMenu>
|
|
|
|
</div>
|