diff --git a/packages/ui/src/ui/components/Tooltip/Tooltip.scss b/packages/ui/src/ui/components/Tooltip/Tooltip.scss index 4405ae1fa..e688823fc 100644 --- a/packages/ui/src/ui/components/Tooltip/Tooltip.scss +++ b/packages/ui/src/ui/components/Tooltip/Tooltip.scss @@ -14,4 +14,11 @@ &_block { display: unset; } + + &_ellipsis { + max-width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } } diff --git a/packages/ui/src/ui/components/Tooltip/Tooltip.tsx b/packages/ui/src/ui/components/Tooltip/Tooltip.tsx index 40930ebeb..c72d94d02 100644 --- a/packages/ui/src/ui/components/Tooltip/Tooltip.tsx +++ b/packages/ui/src/ui/components/Tooltip/Tooltip.tsx @@ -14,12 +14,13 @@ export type TooltipProps = Omit< theme?: PopoverProps['theme'] | 'fix-link-colors'; children?: React.ReactNode; useFlex?: boolean; + ellipsis?: boolean; }; const SHOW_HIDE_DELAY = 400; export function Tooltip(props: TooltipProps) { - const {content, className, children, theme, useFlex, ...rest} = props; + const {content, className, children, theme, useFlex, ellipsis, ...rest} = props; const anchorRef = React.useRef(null); const popoverRef = React.useRef(null); @@ -66,7 +67,7 @@ export function Tooltip(props: TooltipProps) { return (
; + return ; } get hotkeys() {