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

31 lines
767 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
<@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>