ant-design/components/steps/demo/icon.md
2019-05-27 22:04:17 +08:00

31 lines
682 B
Markdown

---
order: 2
title:
zh-CN: 带图标的步骤条
en-US: With icon
---
## zh-CN
通过设置 `Steps.Step``icon` 属性,可以启用自定义图标。
## en-US
You can use your own custom icons by setting the property `icon` for `Steps.Step`.
```jsx
import { Steps, Icon } from 'antd';
const { Step } = Steps;
ReactDOM.render(
<Steps>
<Step status="finish" title="Login" icon={<Icon type="user" />} />
<Step status="finish" title="Verification" icon={<Icon type="solution" />} />
<Step status="process" title="Pay" icon={<Icon type="loading" />} />
<Step status="wait" title="Done" icon={<Icon type="smile-o" />} />
</Steps>,
mountNode,
);
```