UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

50 lines (49 loc) 1.58 kB
/** * MSKCC DSM 2021, 2023 */ import React from 'react'; import { PopoverAlignment } from '../Popover'; export interface DefinitionTooltipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'classname' | 'children' | 'type'> { /** * Specify how the trigger should align with the tooltip */ align?: PopoverAlignment; /** * The `children` prop will be used as the value that is being defined */ children?: React.ReactNode; /** * Specify an optional className to be applied to the container node */ className?: string; /** * Specify whether the tooltip should be open when it first renders */ defaultOpen?: boolean; /** * The `definition` prop is used as the content inside of the tooltip that * appears when a user interacts with the element rendered by the `children` * prop */ definition: React.ReactNode; /** * Provide a value that will be assigned as the id of the tooltip */ id?: string; /** * Specifies whether or not the `DefinitionTooltip` should open on hover or not */ openOnHover?: boolean; /** * @deprecated [Deprecated in v11] Please use the `definition` prop instead. * * Provide the text that will be displayed in the tooltip when it is rendered. */ tooltipText?: React.ReactNode; /** * The CSS class name of the trigger element */ triggerClassName?: string; } declare const DefinitionTooltip: React.FC<DefinitionTooltipProps>; export { DefinitionTooltip };