Skip to content

Commit

Permalink
fix: floatButton tooltip should support number 0 (ant-design#39425)
Browse files Browse the repository at this point in the history
* fix: tooltip should support number 0

* fix

* update snap
  • Loading branch information
li-jia-nan authored Dec 9, 2022
1 parent 1666eb2 commit dd50c59
Show file tree
Hide file tree
Showing 3 changed files with 519 additions and 6 deletions.
6 changes: 1 addition & 5 deletions components/float-button/FloatButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,12 @@ const FloatButton: React.ForwardRefRenderFunction<
[prefixCls, description, icon, type],
);

const buttonNode = tooltip ? (
const buttonNode = (
<Tooltip title={tooltip} placement="left">
<div className={`${prefixCls}-body`}>
<Content {...contentProps} />
</div>
</Tooltip>
) : (
<div className={`${prefixCls}-body`}>
<Content {...contentProps} />
</div>
);

if (process.env.NODE_ENV !== 'production') {
Expand Down
Loading

0 comments on commit dd50c59

Please sign in to comment.