Skip to content

Commit 0da2344

Browse files
committed
fix(tooltip): add TooltipRootProps
1 parent 3a55e0d commit 0da2344

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/components/tooltip/Tooltip.vue

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<script lang="ts">
2-
import type { TooltipContentProps } from 'reka-ui'
2+
import type {
3+
TooltipRootEmits,
4+
TooltipRootProps,
5+
TooltipContentProps,
6+
} from 'reka-ui'
37
import type { ColorType } from '../types'
48
5-
export interface TooltipProps extends TooltipContentProps {
9+
export interface TooltipProps extends TooltipRootProps, TooltipContentProps {
610
/** The content associated with the tooltip. */
711
content?: string
812
/**
@@ -36,13 +40,24 @@ const props = withDefaults(defineProps<TooltipProps>(), {
3640
color: 'gray',
3741
})
3842
43+
const emits = defineEmits<TooltipRootEmits>()
44+
3945
defineOptions({
4046
inheritAttrs: false,
4147
})
4248
</script>
4349

4450
<template>
45-
<TooltipRoot>
51+
<TooltipRoot
52+
:open="props.open"
53+
:default-open="props.defaultOpen"
54+
:delay-duration="props.delayDuration"
55+
:disable-hoverable-content="props.disableHoverableContent"
56+
:disable-closing-trigger="props.disableClosingTrigger"
57+
:disabled="props.disabled"
58+
:ignore-non-keyboard-focus="props.ignoreNonKeyboardFocus"
59+
@update:open="emits('update:open', $event)"
60+
>
4661
<TooltipTrigger
4762
:as="props.as"
4863
:as-child="props.asChild"

0 commit comments

Comments
 (0)