Debian Codegraph @

node/@patternfly/react-core/dist/js/components/Truncate/Truncate.d.ts

raw
1 /// <reference types="react" />
2 import { TooltipPosition, TooltipProps } from '../Tooltip';
3 export declare enum TruncatePosition {
4 start = "start",
5 end = "end",
6 middle = "middle"
7 }
8 export interface TruncateProps extends Omit<React.HTMLProps<HTMLSpanElement | HTMLAnchorElement>, 'ref'> {
9 /** Class to add to outer span */
10 className?: string;
11 /** Text to truncate */
12 content: string;
13 /** An HREF to turn the truncate wrapper into an anchor element. For more custom control, use the
14 * tooltipProps with a triggerRef property passed in.
15 */
16 href?: string;
17 /** The number of characters displayed in the second half of a middle truncation. This will be overridden by
18 * the maxCharsDisplayed prop.
19 */
20 trailingNumChars?: number;
21 /** The maximum number of characters to display before truncating. This will always truncate content
22 * when its length exceeds the value passed to this prop, and container width/resizing will not affect truncation.
23 */
24 maxCharsDisplayed?: number;
25 /** The content to use to signify omission of characters when using the maxCharsDisplayed prop.
26 * By default this will render an ellipsis.
27 */
28 omissionContent?: string;
29 /** Where the text will be truncated */
30 position?: 'start' | 'middle' | 'end';
31 /** Tooltip position */
32 tooltipPosition?: TooltipPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
33 /** Additional props to pass to the tooltip. */
34 tooltipProps?: Omit<TooltipProps, 'content'>;
35 /** @hide Forwarded ref */
36 innerRef?: React.Ref<any>;
37 }
38 export declare const Truncate: import("react").ForwardRefExoticComponent<TruncateProps & import("react").RefAttributes<HTMLSpanElement | HTMLAnchorElement>>;
39 //# sourceMappingURL=Truncate.d.ts.map