ant-design/components/float-button/demo/tooltip.tsx
𝑾𝒖𝒙𝒉 d38aea0138
feat(float-button): support TooltipProps (#53138)
* feat(float-button): support Tooltips props

(cherry picked from commit fb3d131beea52655e780e462eae08662b08095db)

* chore: update demo

(cherry picked from commit 36b39f5e7bf8ace89c705e7ece22549bc623f9e3)

* chore: logic reuse

* chore: update demo snap

* test: add unit test

* chore: edge case

* chore: add warn

* docs: update docs

* revert

* fix: handle undefined and null in convertToTooltipProps
2025-03-13 11:02:06 +08:00

20 lines
415 B
TypeScript

import React from 'react';
import { FloatButton } from 'antd';
const App: React.FC = () => (
<>
<FloatButton
style={{ insetBlockEnd: 108 }}
tooltip={{
// tooltipProps is supported starting from version 5.25.0.
title: 'Since 5.25.0+',
color: 'blue',
placement: 'top',
}}
/>
<FloatButton tooltip={<div>Documents</div>} />
</>
);
export default App;