You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

62 lines
1.3 KiB

import React, { useState } from 'react';
import type { StepsProps } from 'antd';
import { Card, Radio, Steps } from 'antd';
const App: React.FC = () => {
const [size, setSize] = useState<StepsProps['size']>('default');
const description = 'This is a description.';
const horizontalSteps = (
<Card>
<Steps
size={size}
items={[
{
title: 'Finished',
description,
},
{
title: 'In Progress',
description,
},
{
title: 'Waiting',
description,
},
]}
/>
</Card>
);
return (
<>
<Radio.Group
style={{ marginBottom: 16 }}
value={size}
onChange={e => setSize(e.target.value)}
>
<Radio value="small">Small</Radio>
<Radio value="default">Default</Radio>
</Radio.Group>
<Steps
size={size}
direction="vertical"
items={[
{
title: 'Finished',
description: horizontalSteps,
},
{
title: 'In Progress',
description,
},
{
title: 'Waiting',
description,
},
]}
/>
</>
);
};
export default App;