File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ const ComponentsPage = React.createClass({
513
513
514
514
{ /* Tabbed Areas */ }
515
515
< div className = 'bs-docs-section' >
516
- < h1 className = 'page-header' > < Anchor id = 'tabs' > Togglable tabs</ Anchor > < small > TabbedArea, TabPane </ small > </ h1 >
516
+ < h1 className = 'page-header' > < Anchor id = 'tabs' > Togglable tabs</ Anchor > < small > Tabs, Tab </ small > </ h1 >
517
517
518
518
< p > Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</ p >
519
519
Original file line number Diff line number Diff line change @@ -3,9 +3,13 @@ import deprecationWarning from './utils/deprecationWarning';
3
3
import Tab from './Tab' ;
4
4
5
5
const TabPane = React . createClass ( {
6
- componentDidMount ( ) {
7
- deprecationWarning ( 'TabPane' , 'Tab' , 'https://github.com/react-bootstrap/react-bootstrap/pull/1091' ) ;
6
+ componentWillMount ( ) {
7
+ deprecationWarning (
8
+ 'TabPane' , 'Tab' ,
9
+ 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'
10
+ ) ;
8
11
} ,
12
+
9
13
render ( ) {
10
14
return (
11
15
< Tab { ...this . props } />
Original file line number Diff line number Diff line change @@ -5,20 +5,23 @@ import ValidComponentChildren from './utils/ValidComponentChildren';
5
5
import deprecationWarning from './utils/deprecationWarning' ;
6
6
7
7
const TabbedArea = React . createClass ( {
8
- componentDidMount ( ) {
9
- deprecationWarning ( 'TabbedArea' , 'Tabs' , 'https://github.com/react-bootstrap/react-bootstrap/pull/1091' ) ;
8
+ componentWillMount ( ) {
9
+ deprecationWarning (
10
+ 'TabbedArea' , 'Tabs' ,
11
+ 'https://github.com/react-bootstrap/react-bootstrap/pull/1091'
12
+ ) ;
10
13
} ,
14
+
11
15
render ( ) {
12
- let { children, ...props } = this . props ;
13
- let tabTitles = [ ] ;
16
+ const { children, ...props } = this . props ;
14
17
15
- tabTitles = ValidComponentChildren . map ( function ( child ) {
16
- let { tab, ...others } = child . props ;
17
- tabTitles . push ( < TabPane title = { tab } { ...others } /> ) ;
18
+ const tabs = ValidComponentChildren . map ( children , function ( child ) {
19
+ const { tab : title , ...others } = child . props ;
20
+ return < TabPane title = { title } { ...others } /> ;
18
21
} ) ;
19
22
20
23
return (
21
- < Tabs { ...props } > { tabTitles } </ Tabs >
24
+ < Tabs { ...props } > { tabs } </ Tabs >
22
25
) ;
23
26
}
24
27
} ) ;
You can’t perform that action at this time.
0 commit comments