File tree Expand file tree Collapse file tree 1 file changed +19
-23
lines changed Expand file tree Collapse file tree 1 file changed +19
-23
lines changed Original file line number Diff line number Diff line change @@ -12,26 +12,22 @@ export interface TabProps extends Omit<TabPaneProps, 'title'> {
12
12
tabClassName ?: string ;
13
13
}
14
14
15
- /* eslint-disable react/require-render-return, react/no-unused-prop-types */
16
- class Tab extends React . Component < TabProps > {
17
- static propTypes = {
18
- title : PropTypes . node . isRequired ,
19
- } ;
20
-
21
- public static Container = TabContainer ;
22
-
23
- public static Content = TabContent ;
24
-
25
- public static Pane = TabPane ;
26
-
27
- render ( ) {
28
- throw new Error (
29
- 'ReactBootstrap: The `Tab` component is not meant to be rendered! ' +
30
- "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " +
31
- 'For custom tabs components use TabPane and TabsContainer directly' ,
32
- ) ;
33
- return null ;
34
- }
35
- }
36
-
37
- export default Tab ;
15
+ const propTypes = {
16
+ title : PropTypes . node . isRequired ,
17
+ } ;
18
+
19
+ const Tab : React . FC < TabProps > = ( ) => {
20
+ throw new Error (
21
+ 'ReactBootstrap: The `Tab` component is not meant to be rendered! ' +
22
+ "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " +
23
+ 'For custom tabs components use TabPane and TabsContainer directly' ,
24
+ ) ;
25
+ } ;
26
+
27
+ Tab . propTypes = propTypes ;
28
+
29
+ export default Object . assign ( Tab , {
30
+ Container : TabContainer ,
31
+ Content : TabContent ,
32
+ Pane : TabPane ,
33
+ } ) ;
You can’t perform that action at this time.
0 commit comments