mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 07:21:46 +01:00
feat(components): add new content-top and content-bottom slots (#3886)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -162,6 +162,8 @@ export interface InputMenuSlots<
|
||||
'item-trailing': SlotProps<T>
|
||||
'tags-item-text': SlotProps<T>
|
||||
'tags-item-delete': SlotProps<T>
|
||||
'content-top': (props?: {}) => any
|
||||
'content-bottom': (props?: {}) => any
|
||||
'create-item-label'(props: { item: string }): any
|
||||
}
|
||||
</script>
|
||||
@@ -478,6 +480,8 @@ defineExpose({
|
||||
|
||||
<ComboboxPortal v-bind="portalProps">
|
||||
<ComboboxContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
||||
<slot name="content-top" />
|
||||
|
||||
<ComboboxEmpty :class="ui.empty({ class: props.ui?.empty })">
|
||||
<slot name="empty" :search-term="searchTerm">
|
||||
{{ searchTerm ? t('inputMenu.noMatch', { searchTerm }) : t('inputMenu.noData') }}
|
||||
@@ -537,6 +541,8 @@ defineExpose({
|
||||
<ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
|
||||
</ComboboxViewport>
|
||||
|
||||
<slot name="content-bottom" />
|
||||
|
||||
<ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="ui.arrow({ class: props.ui?.arrow })" />
|
||||
</ComboboxContent>
|
||||
</ComboboxPortal>
|
||||
|
||||
Reference in New Issue
Block a user