import React, { PropTypes } from 'react';
import classNames from 'classnames';

const BsNavbar = ({ fixedTop, staticTop, children, ...rest }) => {
  const cx = classNames(
    'navbar',
    'navbar-default',
    {
      'navbar-fixed-top': fixedTop,
      'navbar-static-top': staticTop,
    }
  );
  return (
    <nav className={cx} {...rest}>
      {children}
    </nav>
  );
};

const Header = ({ children, ...rest }) => (
  <div className="navbar-header" {...rest}>
    <button
      type="button"
      className="navbar-toggle collapsed"
      data-toggle="collapse"
      data-target="#navbar"
      aria-expanded="false">
      <span className="sr-only">Toggle navigation</span>
      <span className="icon-bar"></span>
      <span className="icon-bar"></span>
      <span className="icon-bar"></span>
    </button>
    {children}
  </div>
);

const Body = ({ children, ...rest }) => (
  <div className="collapse navbar-collapse" id="navbar" {...rest}>
    {children}
  </div>
);

const Nav = ({ right, children, ...rest }) => {
  const cx = classNames(
    'nav',
    'navbar-nav',
    {
      'navbar-right': right,
    }
  );
  return (
    <ul className={cx} {...rest}>
      {children}
    </ul>
  );
};

const Dropdown = ({ title, children }) => (
  <li className="dropdown">
    <a
      href="#"
      className="dropdown-toggle"
      data-toggle="dropdown"
      role="button"
      aria-haspopup="true"
      aria-expanded="false"
    >
      {title}
      <span className="caret"></span>
    </a>
    <ul className="dropdown-menu">
      {children}
    </ul>
  </li>
);

BsNavbar.propTypes = {
  fixedTop: PropTypes.bool,
  staticTop: PropTypes.bool,
};

Nav.propTypes = {
  right: PropTypes.bool,
};

Dropdown.propTypes = {
  title: PropTypes.string,
};

BsNavbar.Header = Header;
BsNavbar.Body = Body;
BsNavbar.Nav = Nav;
BsNavbar.Dropdown = Dropdown;

export default BsNavbar;

@@ -8,16 +8,27 @@
 React, %7B
+ Component,
  PropTyp
@@ -85,20 +85,20 @@
 mes';%0A%0Ac
-onst
+lass
  BsNavba
@@ -99,20 +99,201 @@
 sNavbar 
-= (%7B
+extends Component %7B%0A  componentDidMount() %7B%0A    if (process.env.BROWSER && this.props.fixedTop) %7B%0A      document.body.style.marginTop = '50px';%0A    %7D%0A  %7D%0A%0A  render() %7B%0A    const %7B%0A     
  fixedTo
@@ -294,16 +294,22 @@
 ixedTop,
+%0A     
  staticT
@@ -311,16 +311,22 @@
 aticTop,
+%0A     
  childre
@@ -323,32 +323,38 @@
    children,
+%0A     
  ...rest
  %7D) =%3E %7B%0A  c
@@ -337,33 +337,48 @@
      ...rest
+,%0A   
  %7D
-)
  =
-%3E %7B%0A
+ this.props;%0A  
   const cx =
@@ -390,24 +390,26 @@
 sNames(%0A    
+ 
+ 
 'navbar',%0A  
@@ -406,16 +406,18 @@
 avbar',%0A
+  
     'nav
@@ -430,26 +430,30 @@
 fault',%0A    
+ 
+ 
 %7B%0A
+  
       'navba
@@ -474,32 +474,34 @@
 fixedTop,%0A      
+ 
+ 
 'navbar-static-t
@@ -516,31 +516,37 @@
 ticTop,%0A    
+  
 %7D%0A  
+ 
+ 
 );%0A
+  
   return (%0A 
@@ -540,24 +540,26 @@
    return (%0A
+  
     %3Cnav cla
@@ -579,32 +579,34 @@
 ...rest%7D%3E%0A      
+  
 %7Bchildren%7D%0A    %3C
@@ -604,16 +604,18 @@
 en%7D%0A    
+ 
+ 
 %3C/nav%3E%0A 
@@ -611,26 +611,32 @@
    %3C/nav%3E%0A  
-);
+  );%0A  %7D
 %0A%7D;%0A%0Aconst H

Improve BsNavbar