mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
feat(components): handle events in content prop
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<script lang="ts">
|
||||
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipArrowProps } from 'reka-ui'
|
||||
import type { TooltipRootProps, TooltipRootEmits, TooltipContentProps, TooltipContentEmits, TooltipArrowProps } from 'reka-ui'
|
||||
import type { AppConfig } from '@nuxt/schema'
|
||||
import _appConfig from '#build/app.config'
|
||||
import theme from '#build/ui/tooltip'
|
||||
import { tv } from '../utils/tv'
|
||||
import type { KbdProps } from '../types'
|
||||
import type { EmitsToProps } from '../types/utils'
|
||||
|
||||
const appConfigTooltip = _appConfig as AppConfig & { ui: { tooltip: Partial<typeof theme> } }
|
||||
|
||||
@@ -19,7 +20,7 @@ export interface TooltipProps extends TooltipRootProps {
|
||||
* The content of the tooltip.
|
||||
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
|
||||
*/
|
||||
content?: Omit<TooltipContentProps, 'as' | 'asChild'>
|
||||
content?: Omit<TooltipContentProps, 'as' | 'asChild'> & Partial<EmitsToProps<TooltipContentEmits>>
|
||||
/**
|
||||
* Display an arrow alongside the tooltip.
|
||||
* @defaultValue false
|
||||
|
||||
Reference in New Issue
Block a user