diff --git a/src/TabbedArea.js b/src/TabbedArea.js
index 23fb06f584..8618614e98 100644
--- a/src/TabbedArea.js
+++ b/src/TabbedArea.js
@@ -108,12 +108,13 @@ const TabbedArea = React.createClass({
},
renderTab(child) {
- let key = child.props.eventKey;
+ let {eventKey, className, tab } = child.props;
return (
- {child.props.tab}
+ ref={'tab' + eventKey}
+ eventKey={eventKey}
+ className={className} >
+ {tab}
);
},
diff --git a/test/TabbedAreaSpec.js b/test/TabbedAreaSpec.js
index ace6c58b0a..2d4e60e3d1 100644
--- a/test/TabbedAreaSpec.js
+++ b/test/TabbedAreaSpec.js
@@ -182,4 +182,20 @@ describe('TabbedArea', function () {
assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'nav-pills'));
});
+
+ it('Should pass className to rendered Tab NavItem', function () {
+ let instance = ReactTestUtils.renderIntoDocument(
+
+ Tab 1 content
+ Tab 3 content
+
+ );
+
+ let tabPane = ReactTestUtils.scryRenderedComponentsWithType(instance, TabPane);
+
+ assert.equal(tabPane.length, 2);
+ assert.equal(tabPane[1].getDOMNode().getAttribute('class').match(/pull-right/)[0], 'pull-right');
+ });
+
+
});