Skip to content

Commit

Permalink
fix: fix FormItem Tooltip #3876 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyunwan authored Jun 29, 2023
1 parent f4e29f8 commit c0913a1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/components/src/form-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ export const BaseItem: React.FC<React.PropsWithChildren<IFormItemProps>> = ({

if ((tooltipLayout === 'text' && tooltip) || overflow) {
return (
<Tooltip
placement="top"
align={{ offset: [0, 10] }}
title={getOverflowTooltip()}
>
<Tooltip placement="top" title={getOverflowTooltip()}>
{labelChildren}
</Tooltip>
)
Expand All @@ -156,7 +152,7 @@ export const BaseItem: React.FC<React.PropsWithChildren<IFormItemProps>> = ({
if (tooltip && tooltipLayout === 'icon' && !overflow) {
return (
<span className={`${prefixCls}-label-tooltip-icon`}>
<Tooltip placement="top" align={{ offset: [0, 2] }} title={tooltip}>
<Tooltip placement="top" title={tooltip}>
{tooltipIcon}
</Tooltip>
</span>
Expand Down

0 comments on commit c0913a1

Please sign in to comment.