mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
33 lines
559 B
TypeScript
33 lines
559 B
TypeScript
|
import React from 'react';
|
||
|
import { Tabs } from 'antd';
|
||
|
|
||
|
const onChange = (key: string) => {
|
||
|
console.log(key);
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<Tabs
|
||
|
defaultActiveKey="1"
|
||
|
onChange={onChange}
|
||
|
items={[
|
||
|
{
|
||
|
label: `Tab 1`,
|
||
|
key: '1',
|
||
|
children: `Content of Tab Pane 1`,
|
||
|
},
|
||
|
{
|
||
|
label: `Tab 2`,
|
||
|
key: '2',
|
||
|
children: `Content of Tab Pane 2`,
|
||
|
},
|
||
|
{
|
||
|
label: `Tab 3`,
|
||
|
key: '3',
|
||
|
children: `Content of Tab Pane 3`,
|
||
|
},
|
||
|
]}
|
||
|
/>
|
||
|
);
|
||
|
|
||
|
export default App;
|