@@ -12,19 +12,30 @@ function ShowMoreButton(deps, props) {
12
12
ShowMoreButton . propTypes /* remove-proptypes */ = {
13
13
children : PropTypes . element ,
14
14
} ;
15
- export default function ResponsiveFactory ( ctx , components ) {
16
- const { setting} = ctx . optionsManager ;
17
- setting . responsiveClass = 'rc-dyn-tabs-responsive' ;
18
- const MoreButtonPlugin = ShowMoreButton . bind ( undefined , { ctx, components} ) ;
15
+ function setTablistOverflow ( ctx , components ) {
16
+ components . MoreButtonPlugin = ShowMoreButton . bind ( undefined , { ctx, components} ) ;
19
17
if ( ! components . OriginalTablistOverflow ) {
20
18
components . OriginalTablistOverflow = components . TablistOverflow ;
21
19
components . TablistOverflow = function ( props ) {
22
20
return (
23
21
< components . OriginalTablistOverflow { ...props } >
24
22
{ props . children }
25
- < MoreButtonPlugin />
23
+ < components . MoreButtonPlugin />
26
24
</ components . OriginalTablistOverflow >
27
25
) ;
28
26
} ;
29
27
}
30
28
}
29
+ function setTablistView ( ctx , components ) {
30
+ components . TablistView = components . TablistViewFactory . bind ( undefined , ( ins ) => ( {
31
+ tablistViewPropsManager : ( ) => {
32
+ let { className} = components . tablistViewPropsManager ( ins ) ;
33
+ className += ' rc-dyn-tabs-responsive' ;
34
+ return { className} ;
35
+ } ,
36
+ } ) ) ;
37
+ }
38
+ export default function ResponsiveFactory ( ctx , components ) {
39
+ setTablistView ( ctx , components ) ;
40
+ setTablistOverflow ( ctx , components ) ;
41
+ }
0 commit comments