File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ for (let i = 0; i < 50; i += 1) {
1313 ) ;
1414}
1515
16+ // add a tab to demo the menuTab feature
17+ tabs . push (
18+ < TabPane key = { 50 } menuTab = 'Fancy Tab' tab = { ( < span > < span style = { { 'color' : 'red' } } > Fancy </ span > Tab </ span > ) } >
19+ Show different tab in the dropdown menu with the menuTab property.
20+ </ TabPane > ,
21+ ) ;
22+
1623export default ( ) => {
1724 const [ gutter , setGutter ] = React . useState ( true ) ;
1825 const [ destroy , setDestroy ] = React . useState ( false ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ function OperationNode(
7373 aria-controls = { id && `${ id } -panel-${ tab . key } ` }
7474 disabled = { tab . disabled }
7575 >
76- { tab . tab }
76+ { tab . menuTab || tab . tab }
7777 </ MenuItem >
7878 ) ) }
7979 </ Menu >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import classNames from 'classnames';
33
44export interface TabPaneProps {
55 tab ?: React . ReactNode ;
6+ menuTab ?: React . ReactNode ;
67 className ?: string ;
78 style ?: React . CSSProperties ;
89 disabled ?: boolean ;
You can’t perform that action at this time.
0 commit comments