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.
 
 

59 lines
1.1 KiB

import React, { useState } from 'react';
import { Divider, Steps } from 'antd';
const App: React.FC = () => {
const [current, setCurrent] = useState(0);
const onChange = (value: number) => {
console.log('onChange:', current);
setCurrent(value);
};
const description = 'This is a description.';
return (
<>
<Steps
current={current}
onChange={onChange}
items={[
{
title: 'Step 1',
description,
},
{
title: 'Step 2',
description,
},
{
title: 'Step 3',
description,
},
]}
/>
<Divider />
<Steps
current={current}
onChange={onChange}
direction="vertical"
items={[
{
title: 'Step 1',
description,
},
{
title: 'Step 2',
description,
},
{
title: 'Step 3',
description,
},
]}
/>
</>
);
};
export default App;