mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-17 23:50:52 +08:00

* basic flex * chore: style basic * chore: status style * chore: small size * chore: label vertical * chore: more style * chore: hover disabled * chore: variant * chore: dot variant * chore: max width * chore: hover dot * chore: update style * chore: click style * chore: init percent * chore: pass detail * chore: for progress * chore: clean up * chore: clean up * chore: multiple css var * chore: status text * chore: status use var * chore: fix nest * chore: use svg * chore: type of panel * chore: offset support * chore: inline offset * chore: warning of steps * docs: add semantic preview * chore: semantic transition * chore: hover * chore: adjust style * chore: update semantic preview * chore: fix nav style * chore: patch panel motion * chore: update semantic preview * docs: update config provider doc * chore: fix part ts def * chore: fix test ts * test: update test case * test: coverage * chore: fix lint * test: update test case * test: update snapshot * chore: adjust style * chore: fix rtl * docs: update design * chore: update sctructure * chore: update comment * chore: clean up * chore: clean up * chore: cursor style * chore: coverage * docs: add missing part * chore: order * test: add test case * chore: fix ts * chore: clean up
64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import type { StepsProps } from 'antd';
|
|
import { Avatar, List, Steps } from 'antd';
|
|
|
|
const data = [
|
|
{
|
|
title: 'Ant Design Title 1',
|
|
current: 0,
|
|
},
|
|
{
|
|
title: 'Ant Design Title 2',
|
|
current: 1,
|
|
status: 'error',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 3',
|
|
current: 2,
|
|
},
|
|
{
|
|
title: 'Ant Design Title 4',
|
|
current: 1,
|
|
},
|
|
];
|
|
|
|
const items = [
|
|
{
|
|
title: 'Step 1',
|
|
content: 'This is Step 1',
|
|
},
|
|
{
|
|
title: 'Step 2',
|
|
content: 'This is Step 2',
|
|
},
|
|
{
|
|
title: 'Step 3',
|
|
content: 'This is Step 3',
|
|
},
|
|
];
|
|
|
|
const App: React.FC = () => (
|
|
<List
|
|
itemLayout="horizontal"
|
|
dataSource={data}
|
|
renderItem={(item, index) => (
|
|
<List.Item>
|
|
<List.Item.Meta
|
|
avatar={<Avatar src={`https://api.dicebear.com/7.x/miniavs/svg?seed=${index}`} />}
|
|
title={<a href="https://ant.design">{item.title}</a>}
|
|
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
|
/>
|
|
<Steps
|
|
style={{ marginTop: 8 }}
|
|
type="inline"
|
|
current={item.current}
|
|
status={item.status as StepsProps['status']}
|
|
items={items}
|
|
/>
|
|
</List.Item>
|
|
)}
|
|
/>
|
|
);
|
|
|
|
export default App;
|