mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-13 08:48:38 +01:00
new selfhosted version
This commit is contained in:
26
dashboard/components/ui/combobox/ComboboxViewport.vue
Normal file
26
dashboard/components/ui/combobox/ComboboxViewport.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import type { ComboboxViewportProps } from 'reka-ui'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { ComboboxViewport, useForwardProps } from 'reka-ui'
|
||||
import { computed, type HTMLAttributes } from 'vue'
|
||||
|
||||
const props = defineProps<ComboboxViewportProps & { class?: HTMLAttributes['class'] }>()
|
||||
|
||||
const delegatedProps = computed(() => {
|
||||
const { class: _, ...delegated } = props
|
||||
|
||||
return delegated
|
||||
})
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ComboboxViewport
|
||||
data-slot="combobox-viewport"
|
||||
v-bind="forwarded"
|
||||
:class="cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', props.class)"
|
||||
>
|
||||
<slot />
|
||||
</ComboboxViewport>
|
||||
</template>
|
||||
Reference in New Issue
Block a user