forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ConfigProvider support Tabs
indicatorSize
(ant-design#44517)
* feat: ConfigProvider support tabs.indicatorLength * feat: ConfigProvider support card.tabProps * Revert "feat: ConfigProvider support card.tabProps" This reverts commit 817af9a. * chore: rename * docs: add demo
- Loading branch information
Showing
12 changed files
with
324 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## zh-CN | ||
|
||
自定义指示器宽度 | ||
|
||
## en-US | ||
|
||
Custom indicator size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import { Tabs } from 'antd'; | ||
import type { TabsProps } from 'antd'; | ||
|
||
const onChange = (key: string) => { | ||
console.log(key); | ||
}; | ||
|
||
const items: TabsProps['items'] = [ | ||
{ | ||
key: '1', | ||
label: 'Tab 1', | ||
children: 'Content of Tab Pane 1', | ||
}, | ||
{ | ||
key: '2', | ||
label: 'Tab 2', | ||
children: 'Content of Tab Pane 2', | ||
}, | ||
{ | ||
key: '3', | ||
label: 'Tab 3', | ||
children: 'Content of Tab Pane 3', | ||
}, | ||
]; | ||
|
||
const App: React.FC = () => ( | ||
<Tabs | ||
defaultActiveKey="1" | ||
items={items} | ||
onChange={onChange} | ||
indicatorSize={(origin) => origin - 16} | ||
/> | ||
); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.