import React, { useState } from 'react'; import { Card } from 'antd'; const tabList = [ { key: 'tab1', tab: 'tab1', }, { key: 'tab2', tab: 'tab2', }, ]; const contentList: Record = { tab1:

content1

, tab2:

content2

, }; const tabListNoTitle = [ { key: 'article', label: 'article', }, { key: 'app', label: 'app', }, { key: 'project', label: 'project', }, ]; const contentListNoTitle: Record = { article:

article content

, app:

app content

, project:

project content

, }; const App: React.FC = () => { const [activeTabKey1, setActiveTabKey1] = useState('tab1'); const [activeTabKey2, setActiveTabKey2] = useState('app'); const onTab1Change = (key: string) => { setActiveTabKey1(key); }; const onTab2Change = (key: string) => { setActiveTabKey2(key); }; return ( <> More} tabList={tabList} activeTabKey={activeTabKey1} onTabChange={onTab1Change} > {contentList[activeTabKey1]}

More} onTabChange={onTab2Change} tabProps={{ size: 'middle', }} > {contentListNoTitle[activeTabKey2]} ); }; export default App;