File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ const ComponentsPage = React.createClass({
513513
514514 { /* Tabbed Areas */ }
515515 < 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 >
517517
518518 < p > Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</ p >
519519
Original file line number Diff line number Diff line change @@ -3,9 +3,13 @@ import deprecationWarning from './utils/deprecationWarning';
33import Tab from './Tab' ;
44
55const 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+ ) ;
811 } ,
12+
913 render ( ) {
1014 return (
1115 < Tab { ...this . props } />
Original file line number Diff line number Diff line change @@ -5,20 +5,23 @@ import ValidComponentChildren from './utils/ValidComponentChildren';
55import deprecationWarning from './utils/deprecationWarning' ;
66
77const 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+ ) ;
1013 } ,
14+
1115 render ( ) {
12- let { children, ...props } = this . props ;
13- let tabTitles = [ ] ;
16+ const { children, ...props } = this . props ;
1417
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 } /> ;
1821 } ) ;
1922
2023 return (
21- < Tabs { ...props } > { tabTitles } </ Tabs >
24+ < Tabs { ...props } > { tabs } </ Tabs >
2225 ) ;
2326 }
2427} ) ;
You can’t perform that action at this time.
0 commit comments