mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 21:48:19 +08:00
21 lines
444 B
TypeScript
21 lines
444 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 {
|
|
key: id,
|
|
label: `Tab ${id}`,
|
|
children: `Tab ${id}`,
|
|
icon: <Icon />,
|
|
};
|
|
})}
|
|
/>
|
|
);
|
|
|
|
export default App;
|