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

28 lines
571 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 2
2016-07-21 10:07:30 +08:00
title:
zh-CN: 带图标的步骤条
en-US: With icon
2016-03-31 09:40:55 +08:00
---
2015-07-08 15:53:51 +08:00
2016-07-21 10:07:30 +08:00
## zh-CN
2015-09-01 17:43:08 +08:00
通过设置 `Steps.Step``icon` 属性,可以启用自定义图标。
2015-07-08 15:53:51 +08:00
2016-07-21 10:07:30 +08:00
## en-US
You can use your own custom icons by setting the property `icon` for `Steps.Step`.
2015-07-08 15:53:51 +08:00
````jsx
import { Steps, Icon } from 'antd';
const Step = Steps.Step;
2015-07-08 15:53:51 +08:00
2016-07-21 14:20:49 +08:00
ReactDOM.render(
<Steps>
<Step status="finish" title="Step 1" icon="cloud" />
<Step status="process" title="Step 2" icon="apple" />
<Step status="wait" title="Step 3" icon={<Icon type="github" />} />
2016-07-21 14:20:49 +08:00
</Steps>
, mountNode);
2015-07-08 15:53:51 +08:00
````