mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-14 17:01:17 +08:00
d08deeeb8a
* refactor: Popout FloatButton component * test: Update snapshot * docs: add BackTop * test: Update snapshot * chore: fix compile * chore: fix ts * chore: pure panel size
973 B
973 B
order | iframe | title | ||||
---|---|---|---|---|---|---|
3 | 360 |
|
zh-CN
可以通过 description
设置文字内容。
仅当
shape
属性为square
时支持。由于空间较小,推荐使用比较精简的双数文字。
en-US
Setting description
prop to show FloatButton with description.
supported only when
shape
issquare
. Due to narrow space for text, short sentence is recommended.
import React from 'react';
import { FloatButton } from 'antd';
import { FileTextOutlined } from '@ant-design/icons';
const App: React.FC = () => (
<>
<FloatButton
icon={<FileTextOutlined />}
description="HELP INFO"
shape="square"
style={{ right: 24 }}
/>
<FloatButton description="HELP INFO" shape="square" style={{ right: 94 }} />
<FloatButton
icon={<FileTextOutlined />}
description="HELP"
shape="square"
style={{ right: 164 }}
/>
</>
);
export default App;