mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 17:59:57 +08:00
26 lines
498 B
TypeScript
26 lines
498 B
TypeScript
|
import React from 'react';
|
||
|
import { AndroidOutlined, AppleOutlined } from '@ant-design/icons';
|
||
|
import { Tabs } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<Tabs
|
||
|
defaultActiveKey="2"
|
||
|
items={[AppleOutlined, AndroidOutlined].map((Icon, i) => {
|
||
|
const id = String(i + 1);
|
||
|
|
||
|
return {
|
||
|
label: (
|
||
|
<span>
|
||
|
<Icon />
|
||
|
Tab {id}
|
||
|
</span>
|
||
|
),
|
||
|
key: id,
|
||
|
children: `Tab ${id}`,
|
||
|
};
|
||
|
})}
|
||
|
/>
|
||
|
);
|
||
|
|
||
|
export default App;
|