UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

37 lines 1.99 kB
import * as React from 'react'; import { Placement } from '@workday/canvas-kit-react/popup'; /** * Look for an element within the tree for an overflow element (auto, scroll, clip, or hidden). * This could be the passed element, or a descendant. If no element is found, `null` is returned. */ export declare const findOverflowElement: (element: Element) => Element | null; /** * Look for an element within the tree for a `text-overflow` CSS property of `ellipsis`. * This could be the passed element, or a descendant. If no element is found, `null` is returned. */ export declare const findEllipsisElement: (element: Element) => Element | null; export interface OverflowTooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> { /** * The target (anchor element) for the Tooltip. * * **Note:** This **must** be a single Element, StyledComponent, or any other component that * forwards extra props to an Element. Tooltip works running `React.cloneElement` on the children * and adds extra properties like aria attributes and event handlers. This is currently a * limitation of the Tooltip component. Functionality will not work if this condition isn't met. */ children: React.ReactElement<any>; /** * Sets the placement preference used by PopperJS. * @default 'top' */ placement?: Placement; /** * Define fallback placements by providing a list of {@link Placement} in array (in order of preference). * The default preference is following the order of `top`, `right`, `bottom`, and `left`. Once the initial * and opposite placements are not available, the fallback placements will be in use. Use an empty array to * disable the fallback placements. */ fallbackPlacements?: Placement[]; } export declare const OverflowTooltip: ({ placement, fallbackPlacements, children, ...elemProps }: OverflowTooltipProps) => React.JSX.Element; //# sourceMappingURL=OverflowTooltip.d.ts.map