chore(components): improve props

This commit is contained in:
Benjamin Canac
2024-06-28 18:13:03 +02:00
parent c9f9a248b7
commit 673064dee5
38 changed files with 260 additions and 137 deletions

View File

@@ -17,17 +17,17 @@ export interface TooltipProps extends TooltipRootProps {
kbds?: KbdProps['value'][] | KbdProps[]
/**
* The content of the tooltip.
* @defaultValue `{ side: 'bottom', sideOffset: 8 }`
* @defaultValue { side: 'bottom', sideOffset: 8 }
*/
content?: Omit<TooltipContentProps, 'as' | 'asChild'>
/**
* Display an arrow alongside the tooltip.
* @defaultValue `false`
* @defaultValue false
*/
arrow?: boolean | Omit<TooltipArrowProps, 'as' | 'asChild'>
/**
* Render the tooltip in a portal.
* @defaultValue `true`
* @defaultValue true
*/
portal?: boolean
class?: any
@@ -49,7 +49,9 @@ import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArro
import { reactivePick } from '@vueuse/core'
import { UKbd } from '#components'
const props = withDefaults(defineProps<TooltipProps>(), { portal: true })
const props = withDefaults(defineProps<TooltipProps>(), {
portal: true
})
const emits = defineEmits<TooltipEmits>()
const slots = defineSlots<TooltipSlots>()