From 0be007f9f5b3f26fe664e59932f666a79325b0c5 Mon Sep 17 00:00:00 2001 From: jquense Date: Sat, 14 Nov 2015 14:17:03 -0500 Subject: [PATCH] [removed] Nav `right` prop in favor of `pullRight` --- src/Nav.js | 7 ++++--- test/NavbarSpec.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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(