ant-design/components/button/demo/icon.md

27 lines
556 B
Markdown
Raw Normal View History

2015-06-17 18:22:20 +08:00
# 图标按钮
2016-03-25 18:13:51 +08:00
- order: 1
2015-09-27 16:30:35 +08:00
`Button` 内可以嵌套图标,图标可以放在文字前、后,也可以单独存在。
2015-06-25 17:39:24 +08:00
---
2015-09-27 16:30:35 +08:00
````jsx
2016-03-25 18:13:51 +08:00
import { Button } from 'antd';
2015-09-27 16:30:35 +08:00
2015-10-20 16:47:55 +08:00
ReactDOM.render(<div>
2016-03-25 18:13:51 +08:00
<Button type="primary" shape="circle" icon="search" />
<Button type="primary" icon="search">按钮</Button>
2015-09-27 16:30:35 +08:00
<br />
2016-03-25 18:13:51 +08:00
<Button type="ghost" shape="circle-outline" icon="search" />
<Button type="ghost" icon="search">按钮</Button>
</div>, mountNode);
2015-06-25 17:39:24 +08:00
````
2015-09-27 16:30:35 +08:00
<style>
#components-button-demo-icon .ant-btn {
margin-right: 8px;
margin-bottom: 12px;
}
</style>