mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
628968f460
* refactor: Using items * docs: replace with items * docs: deprecated demo * test: Update snapshot * docs: simple basic demo * test: coverage
657 B
657 B
order | title | ||||
---|---|---|---|---|---|
8 |
|
zh-CN
另一种样式的页签,不提供对应的垂直样式。
en-US
Another type of Tabs, which doesn't support vertical mode.
import { Tabs } from 'antd';
import React from 'react';
const onChange = (key: string) => {
console.log(key);
};
const App: React.FC = () => (
<Tabs
onChange={onChange}
type="card"
items={new Array(3).fill(null).map((_, i) => {
const id = String(i + 1);
return {
label: `Tab ${id}`,
key: id,
children: `Content of Tab Pane ${id}`,
};
})}
/>
);
export default App;