fix(hover-card): add emits from radix-vue

This commit is contained in:
Artemiy111 2024-03-25 15:51:45 +03:00
parent 1f97ce0d24
commit 58c934cace
2 changed files with 8 additions and 6 deletions

View File

@ -1,13 +1,14 @@
<script setup lang="ts"> <script setup lang="ts">
import { HoverCardRoot, type HoverCardRootProps, useForwardProps } from 'radix-vue' import { HoverCardRoot, type HoverCardRootEmits, type HoverCardRootProps, useForwardPropsEmits } from 'radix-vue'
const props = defineProps<HoverCardRootProps>() const props = defineProps<HoverCardRootProps>()
const emits = defineEmits<HoverCardRootEmits>()
const forwardedProps = useForwardProps(props) const forwarded = useForwardPropsEmits(props, emits)
</script> </script>
<template> <template>
<HoverCardRoot v-bind="forwardedProps"> <HoverCardRoot v-bind="forwarded">
<slot /> <slot />
</HoverCardRoot> </HoverCardRoot>
</template> </template>

View File

@ -1,13 +1,14 @@
<script setup lang="ts"> <script setup lang="ts">
import { HoverCardRoot, type HoverCardRootProps, useForwardProps } from 'radix-vue' import { HoverCardRoot, type HoverCardRootEmits, type HoverCardRootProps, useForwardPropsEmits } from 'radix-vue'
const props = defineProps<HoverCardRootProps>() const props = defineProps<HoverCardRootProps>()
const emits = defineEmits<HoverCardRootEmits>()
const forwardedProps = useForwardProps(props) const forwarded = useForwardPropsEmits(props, emits)
</script> </script>
<template> <template>
<HoverCardRoot v-bind="forwardedProps"> <HoverCardRoot v-bind="forwarded">
<slot /> <slot />
</HoverCardRoot> </HoverCardRoot>
</template> </template>