DialogDescription.vue 679 B

1234567891011121314151617181920212223
  1. <script setup lang="ts">
  2. import type { DialogDescriptionProps } from "reka-ui"
  3. import type { HTMLAttributes } from "vue"
  4. import { reactiveOmit } from "@vueuse/core"
  5. import { DialogDescription, useForwardProps } from "reka-ui"
  6. import { cn } from "@/lib/utils"
  7. const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes["class"] }>()
  8. const delegatedProps = reactiveOmit(props, "class")
  9. const forwardedProps = useForwardProps(delegatedProps)
  10. </script>
  11. <template>
  12. <DialogDescription
  13. data-slot="dialog-description"
  14. v-bind="forwardedProps"
  15. :class="cn('text-muted-foreground text-sm', props.class)"
  16. >
  17. <slot />
  18. </DialogDescription>
  19. </template>