ant-design/components/tabs/demo/centered.md

37 lines
498 B
Markdown
Raw Normal View History

---
order: 2
title:
zh-CN: 居中
en-US: Centered
---
## zh-CN
标签居中展示。
## en-US
Centered tabs.
```tsx
import { Tabs } from 'antd';
2022-05-23 14:37:16 +08:00
import React from 'react';
const App: React.FC = () => (
<Tabs
defaultActiveKey="1"
centered
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;
```