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) {
13
13
) ;
14
14
}
15
15
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
+
16
23
export default ( ) => {
17
24
const [ gutter , setGutter ] = React . useState ( true ) ;
18
25
const [ destroy , setDestroy ] = React . useState ( false ) ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ function OperationNode(
73
73
aria-controls = { id && `${ id } -panel-${ tab . key } ` }
74
74
disabled = { tab . disabled }
75
75
>
76
- { tab . tab }
76
+ { tab . menuTab || tab . tab }
77
77
</ MenuItem >
78
78
) ) }
79
79
</ Menu >
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import classNames from 'classnames';
3
3
4
4
export interface TabPaneProps {
5
5
tab ?: React . ReactNode ;
6
+ menuTab ?: React . ReactNode ;
6
7
className ?: string ;
7
8
style ?: React . CSSProperties ;
8
9
disabled ?: boolean ;
You can’t perform that action at this time.
0 commit comments