consul/ui/packages/consul-ui/app/components/disclosure-menu/menu/index.hbs

24 lines
735 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<@disclosure.Details as |details|>
<PagedCollection @items={{or @items (array)}} as |pager|>
<div
{{on-outside 'click' @disclosure.close}}
{{did-insert pager.viewport}}
{{on-resize pager.resize}}
{{css-prop '--paged-row-height' returns=pager.rowHeight}}
{{css-prop 'max-height' returns=pager.maxHeight}}
class={{class-map
(array
'paged-collection-scroll' (includes pager.type (array 'virtual-scroll' 'native-scroll'))
)
}}
...attributes
>
{{yield (hash Menu=(component 'menu' disclosure=@disclosure pager=pager))}}
</div>
</PagedCollection>
</@disclosure.Details>