chore(components): improve JSDoc

This commit is contained in:
Benjamin Canac
2024-06-11 18:23:56 +02:00
parent 655d9b2c97
commit ee3d2aa30f
27 changed files with 232 additions and 10 deletions

View File

@@ -11,10 +11,24 @@ const appConfig = _appConfig as AppConfig & { ui: { tooltip: Partial<typeof them
const tooltip = tv({ extend: tv(theme), ...(appConfig.ui?.tooltip || {}) })
export interface TooltipProps extends TooltipRootProps {
/** The text content of the tooltip. */
text?: string
/** The keyboard keys to display in the tooltip. */
kbds?: KbdProps['value'][] | KbdProps[]
/**
* The content of the tooltip.
* @defaultValue `{ side: 'bottom', sideOffset: 8 }`
*/
content?: Omit<TooltipContentProps, 'asChild'>
/**
* Display an arrow alongside the tooltip.
* @defaultValue `false`
*/
arrow?: boolean | Omit<TooltipArrowProps, 'asChild'>
/**
* Render the tooltip in a portal.
* @defaultValue `true`
*/
portal?: boolean
class?: any
ui?: Partial<typeof tooltip.slots>