mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
956 B
956 B
order | title | ||||
---|---|---|---|---|---|
9 |
|
zh-CN
为点状步骤条增加自定义展示。
en-US
You can customize the display for Steps with progress dot style.
import type { StepsProps } from 'antd';
import { Popover, Steps } from 'antd';
import React from 'react';
const { Step } = Steps;
const customDot: StepsProps['progressDot'] = (dot, { status, index }) => (
<Popover
content={
<span>
step {index} status: {status}
</span>
}
>
{dot}
</Popover>
);
const App: React.FC = () => (
<Steps current={1} progressDot={customDot}>
<Step title="Finished" description="You can hover on the dot." />
<Step title="In Progress" description="You can hover on the dot." />
<Step title="Waiting" description="You can hover on the dot." />
<Step title="Waiting" description="You can hover on the dot." />
</Steps>
);
export default App;