mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 18:09:22 +08:00
2113c25664
* feat: <Progress steps /> could accept string[] as strokeColor close #35852 close #26858 * fix: tsx demo * docs: add version column
35 lines
617 B
Markdown
35 lines
617 B
Markdown
---
|
|
order: 11
|
|
title:
|
|
zh-CN: 步骤进度条
|
|
en-US: Progress bar with steps
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
带步骤的进度条。
|
|
|
|
## en-US
|
|
|
|
A progress bar with steps.
|
|
|
|
```tsx
|
|
import React from 'react';
|
|
import { Progress } from 'antd';
|
|
import { red, green } from '@ant-design/colors';
|
|
|
|
const App: React.FC = () => (
|
|
<>
|
|
<Progress percent={50} steps={3} />
|
|
<br />
|
|
<Progress percent={30} steps={5} />
|
|
<br />
|
|
<Progress percent={100} steps={5} size="small" strokeColor={green[6]} />
|
|
<br />
|
|
<Progress percent={60} steps={5} strokeColor={[green[6], green[6], red[5]]} />
|
|
</>
|
|
);
|
|
|
|
export default App;
|
|
```
|