Skip to content

Commit

Permalink
feat(tooltip): export slots type (tusen-ai#6599)
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Dec 7, 2024
1 parent 105c873 commit 90624f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tooltip/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default as NTooltip, tooltipProps } from './src/Tooltip'
export type { TooltipInst, TooltipProps } from './src/Tooltip'
export type { TooltipInst, TooltipProps, TooltipSlots } from './src/Tooltip'
7 changes: 5 additions & 2 deletions src/tooltip/src/Tooltip.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { ThemeProps } from '../../_mixins'
import type { ExtractPublicPropTypes } from '../../_utils'
import type { PopoverInst } from '../../popover'
import type { PopoverInst, PopoverSlots } from '../../popover'
import type { TooltipTheme } from '../styles'
// Tooltip: popover wearing waistcoat
import { computed, defineComponent, h, ref } from 'vue'
import { computed, defineComponent, h, ref, type SlotsType } from 'vue'
import { useConfig, useTheme } from '../../_mixins'
import { NPopover } from '../../popover'
import { popoverBaseProps } from '../../popover/src/Popover'
Expand All @@ -18,9 +18,12 @@ export const tooltipProps = {

export type TooltipProps = ExtractPublicPropTypes<typeof tooltipProps>

export interface TooltipSlots extends PopoverSlots {}

export default defineComponent({
name: 'Tooltip',
props: tooltipProps,
slots: Object as SlotsType<TooltipSlots>,
__popover__: true,
setup(props) {
const { mergedClsPrefixRef } = useConfig(props)
Expand Down

0 comments on commit 90624f1

Please sign in to comment.