diff --git a/src/Nav.js b/src/Nav.js index 2087ceebe5..fe840c87ce 100644 --- a/src/Nav.js +++ b/src/Nav.js @@ -18,11 +18,12 @@ class Nav extends React.Component { classes[tbsUtils.prefix(this.props, 'justified')] = this.props.justified; - if (this.props.navbar) { + if (isNavbar) { let bsClass = this.context.$bs_navbar_bsClass || 'navbar'; + const navbarRight = this.props.right != null ? this.props.right : this.props.pullRight; classes[tbsUtils.prefix({ bsClass }, 'nav')] = true; - classes[tbsUtils.prefix({ bsClass }, 'right')] = isNavbar; + classes[tbsUtils.prefix({ bsClass }, 'right')] = navbarRight; } else { classes['pull-right'] = this.props.pullRight; } @@ -119,7 +120,7 @@ Nav.propTypes = { navbar: React.PropTypes.bool, eventKey: React.PropTypes.any, pullRight: React.PropTypes.bool, - right: React.PropTypes.bool + right: deprecated(React.PropTypes.bool, 'Use the `pullRight` prop instead') }; Nav.contextTypes = { diff --git a/test/NavbarSpec.js b/test/NavbarSpec.js index 1aa7283321..63fb6d7cb8 100644 --- a/test/NavbarSpec.js +++ b/test/NavbarSpec.js @@ -186,7 +186,7 @@ describe('Navbar', () => { expect(collapse.context.$bs_navbar_navExpanded).to.equal(true); }); - it.only('Should wire the toggle to the collapse', () => { + it('Should wire the toggle to the collapse', () => { let instance = ReactTestUtils.renderIntoDocument(