(props)
| 40 | }; |
| 41 | |
| 42 | function Navbar(props) { |
| 43 | const { |
| 44 | expand = false, |
| 45 | className, |
| 46 | cssModule, |
| 47 | light, |
| 48 | dark, |
| 49 | fixed, |
| 50 | sticky, |
| 51 | color, |
| 52 | container = 'fluid', |
| 53 | tag: Tag = 'nav', |
| 54 | children, |
| 55 | ...attributes |
| 56 | } = props; |
| 57 | |
| 58 | const classes = mapToCssModules( |
| 59 | classNames(className, 'navbar', getExpandClass(expand), { |
| 60 | 'navbar-light': light, |
| 61 | 'navbar-dark': dark, |
| 62 | [`bg-${color}`]: color, |
| 63 | [`fixed-${fixed}`]: fixed, |
| 64 | [`sticky-${sticky}`]: sticky, |
| 65 | }), |
| 66 | cssModule, |
| 67 | ); |
| 68 | |
| 69 | const containerClass = |
| 70 | container && container === true ? 'container' : `container-${container}`; |
| 71 | |
| 72 | return ( |
| 73 | <Tag {...attributes} className={classes}> |
| 74 | {container ? <div className={containerClass}>{children}</div> : children} |
| 75 | </Tag> |
| 76 | ); |
| 77 | } |
| 78 | |
| 79 | Navbar.propTypes = propTypes; |
| 80 |
nothing calls this directly
no test coverage detected
searching dependent graphs…