1- import React , { cloneElement } from 'react' ;
2- import BootstrapMixin from './BootstrapMixin' ;
3- import Collapse from './Collapse' ;
41import classNames from 'classnames' ;
2+ import React , { cloneElement } from 'react' ;
3+ import all from 'react-prop-types/lib/all' ;
54
65import ValidComponentChildren from './utils/ValidComponentChildren' ;
76import createChainedFunction from './utils/createChainedFunction' ;
87
8+ import BootstrapMixin from './BootstrapMixin' ;
9+ import Collapse from './Collapse' ;
10+
911const Nav = React . createClass ( {
1012 mixins : [ BootstrapMixin ] ,
1113
@@ -14,7 +16,17 @@ const Nav = React.createClass({
1416 activeKey : React . PropTypes . any ,
1517 bsStyle : React . PropTypes . oneOf ( [ 'tabs' , 'pills' ] ) ,
1618 stacked : React . PropTypes . bool ,
17- justified : React . PropTypes . bool ,
19+ /**
20+ * Make `NavItem`s equal widths on small or larger displays and stacked
21+ * otherwise. Not supported for `Nav`s in `Navbar`s.
22+ */
23+ justified : all (
24+ React . PropTypes . bool ,
25+ ( { justified, navbar} ) => (
26+ justified && navbar ?
27+ Error ( 'justified navbar `Nav`s are not supported' ) : null
28+ )
29+ ) ,
1830 onSelect : React . PropTypes . func ,
1931 collapsible : React . PropTypes . bool ,
2032 /**
0 commit comments