Sink/components/ui/drawer/DrawerDescription.vue
ccbikai 67c588eb12 feat: add mobile-responsive drawer for search & filters
Replaces desktop-only popover components with responsive alternatives:
- Adds drawer component for mobile view using vaul-vue
- Extracts shared templates for reusability
- Adjusts layout and height based on viewport size
- Maintains desktop popover behavior on larger screens

Improves mobile user experience while preserving desktop functionality
2025-03-02 15:56:20 +08:00

21 lines
611 B
Vue

<script lang="ts" setup>
import type { DrawerDescriptionProps } from 'vaul-vue'
import type { HtmlHTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DrawerDescription } from 'vaul-vue'
import { computed } from 'vue'
const props = defineProps<DrawerDescriptionProps & { class?: HtmlHTMLAttributes['class'] }>()
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props
return delegated
})
</script>
<template>
<DrawerDescription v-bind="delegatedProps" :class="cn('text-sm text-muted-foreground', props.class)">
<slot />
</DrawerDescription>
</template>