mirror of https://github.com/hashicorp/consul
42 lines
891 B
Handlebars
42 lines
891 B
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: MPL-2.0
|
|
}}
|
|
|
|
<PopoverMenu
|
|
class="popover-select"
|
|
...attributes
|
|
@position={{or position "left"}}
|
|
as |components menu|
|
|
>
|
|
{{yield}}
|
|
{{#let
|
|
(component 'popover-select/optgroup' components=components)
|
|
(component 'popover-select/option'
|
|
select=this components=components
|
|
onclick=(pipe
|
|
(action "click")
|
|
(if multiple (noop) menu.toggle)
|
|
)
|
|
)
|
|
as |Optgroup Option|
|
|
}}
|
|
<BlockSlot @name="trigger">
|
|
<YieldSlot @name="selected">
|
|
{{yield (hash
|
|
Optgroup=Optgroup
|
|
Option=Option
|
|
)}}
|
|
</YieldSlot>
|
|
</BlockSlot>
|
|
<BlockSlot @name="menu">
|
|
<YieldSlot @name="options">
|
|
{{yield (hash
|
|
Optgroup=Optgroup
|
|
Option=Option
|
|
)}}
|
|
</YieldSlot>
|
|
</BlockSlot>
|
|
{{/let}}
|
|
</PopoverMenu>
|