import React from 'react'; import { ConfigProvider, Divider, Flex, Steps, StepsProps } from 'antd'; const items: StepsProps['items'] = [ { title: 'Finished', content: 'This is a content.', }, { title: 'In Progress', content: 'This is a content.', status: 'error', }, { title: 'Waiting', content: 'This is a content.', }, ]; const App: React.FC = () => { const [current, setCurrent] = React.useState(1); const sharedProps: StepsProps = { current, variant: 'outlined', onChange: (current: number) => { setCurrent(current); }, items, }; const sharedPercentProps: StepsProps = { current, variant: 'outlined', onChange: (current: number) => { setCurrent(current); }, items: items.map(({ status, ...item }) => item), percent: 60, }; return ( ); }; export default App;