forked from BRETT/BRETT
29 lines
839 B
Vue
29 lines
839 B
Vue
<script setup lang="ts">
|
|
import type { AccordionContentProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { reactiveOmit } from '@vueuse/core'
|
|
import { AccordionContent } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const props = defineProps<AccordionContentProps & { class?: HTMLAttributes['class'] }>()
|
|
|
|
const delegatedProps = reactiveOmit(props, 'class')
|
|
</script>
|
|
|
|
<template>
|
|
<AccordionContent
|
|
data-slot="accordion-content"
|
|
v-bind="delegatedProps"
|
|
class="data-open:animate-accordion-down data-closed:animate-accordion-up px-4 text-sm overflow-hidden"
|
|
>
|
|
<div
|
|
:class="cn(
|
|
'pt-0 pb-4 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4',
|
|
props.class,
|
|
)"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</AccordionContent>
|
|
</template>
|