Skip to content

Commit

Permalink
fix(design): change tooltip to not remain active after hover
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Apr 1, 2024
1 parent 71e1d94 commit 9ac02cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/design/src/components/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const Tooltip = forwardRef((props: ITooltipProps, ref: Ref<TooltipRef>) =
builtinPlacements={placements}
placement={placement}
mouseEnterDelay={0.2}
mouseLeaveDelay={0}
showArrow
destroyTooltipOnHide
onVisibleChange={onVisibleChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const CopyableStatisticItem: React.FC<IStatisticItem> = (item: IStatistic
});
};
return (
<Tooltip title={localeService.t('statusbar.clickToCopy')} placement="top" style={{ pointerEvents: 'none' }}>
<Tooltip title={localeService.t('statusbar.clickToCopy')} placement="top">
<div key={item.name} className={styles.statisticItem} onClick={copyToClipboard}>
<span>
{`${localeService.t(
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/common/z-index-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/

export class ZIndexManager {
static #MAX_INDEX = 2147483647;
static #MIN_INDEX = -2147483647;

private _list: Map<string, number> = new Map();

setIndex(name: string, index: number) {
Expand Down
6 changes: 4 additions & 2 deletions packages/ui/src/views/components/doc-bars/index.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@
flex-wrap: wrap;

&:not(:last-child) {
margin-bottom: var(--margin-xs);

&::after {
content: initial;
}

> *:last-child {
margin-bottom: var(--margin-xs);
}
}
}
}
Expand Down

0 comments on commit 9ac02cb

Please sign in to comment.