mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-17 23:50:52 +08:00

* 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
20 lines
415 B
TypeScript
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;
|