Skip to content

Commit

Permalink
[removed] Nav right prop in favor of pullRight
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Nov 15, 2015
1 parent 5dbafd3 commit 0be007f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion test/NavbarSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<Navbar>
<Navbar.Header>
Expand Down

0 comments on commit 0be007f

Please sign in to comment.