ant-design/components/steps/demo/icon.md
黑雨 65f067eb13
feat: Steps supports items (#37531)
* feat: support items

* feat: update demo

* test: update package

* test: update use type

* test: update for test

* test: update for lint

* feat: update doc

* test: update for lint

* test: update for lint

* test: update for lint

* test: add deprecated dome

* test: add deprecated dome

* doc: update doc

* feat: update package

* test: add test case
2022-09-16 15:52:14 +08:00

911 B

order title
2
zh-CN en-US
带图标的步骤条 With icon

zh-CN

通过设置 itemsicon 属性,可以启用自定义图标。

en-US

You can use your own custom icons by setting the property icon for items.

import { LoadingOutlined, SmileOutlined, SolutionOutlined, UserOutlined } from '@ant-design/icons';
import { Steps } from 'antd';
import React from 'react';

const App: React.FC = () => (
  <Steps
    items={[
      {
        title: 'Login',
        status: 'finish',
        icon: <UserOutlined />,
      },
      {
        title: 'Verification',
        status: 'finish',
        icon: <SolutionOutlined />,
      },
      {
        title: 'Pay',
        status: 'process',
        icon: <LoadingOutlined />,
      },
      {
        title: 'Done',
        status: 'wait',
        icon: <SmileOutlined />,
      },
    ]}
  />
);

export default App;