File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const propTypes = {
77 inverse : PropTypes . bool ,
88 full : PropTypes . bool ,
99 fixed : PropTypes . string ,
10+ sticky : PropTypes . string ,
1011 color : PropTypes . string ,
1112 role : PropTypes . string ,
1213 tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
@@ -40,6 +41,7 @@ const Navbar = (props) => {
4041 inverse,
4142 full,
4243 fixed,
44+ sticky,
4345 color,
4446 tag : Tag ,
4547 ...attributes
@@ -54,7 +56,8 @@ const Navbar = (props) => {
5456 'navbar-inverse' : inverse ,
5557 [ `bg-${ color } ` ] : color ,
5658 'navbar-full' : full ,
57- [ `navbar-fixed-${ fixed } ` ] : fixed
59+ [ `navbar-fixed-${ fixed } ` ] : fixed ,
60+ [ `sticky-${ sticky } ` ] : sticky ,
5861 }
5962 ) , cssModule ) ;
6063
Original file line number Diff line number Diff line change @@ -41,13 +41,14 @@ describe('Navbar', () => {
4141 } ) ;
4242
4343 it ( 'should render prop based classes' , ( ) => {
44- const wrapper = shallow ( < Navbar light inverse toggleable = "sm" color = "success" full fixed = "top" /> ) ;
44+ const wrapper = shallow ( < Navbar light inverse toggleable = "sm" color = "success" full sticky = "top" fixed = "top" /> ) ;
4545
4646 expect ( wrapper . hasClass ( 'bg-success' ) ) . toBe ( true ) ;
4747 expect ( wrapper . hasClass ( 'navbar' ) ) . toBe ( true ) ;
4848 expect ( wrapper . hasClass ( 'navbar-toggleable-sm' ) ) . toBe ( true ) ;
4949 expect ( wrapper . hasClass ( 'navbar-light' ) ) . toBe ( true ) ;
5050 expect ( wrapper . hasClass ( 'navbar-inverse' ) ) . toBe ( true ) ;
5151 expect ( wrapper . hasClass ( 'navbar-fixed-top' ) ) . toBe ( true ) ;
52+ expect ( wrapper . hasClass ( 'sticky-top' ) ) . toBe ( true ) ;
5253 } ) ;
5354} ) ;
You can’t perform that action at this time.
0 commit comments