MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / Navbar

Function Navbar

src/Navbar.js:42–77  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

40};
41
42function 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
79Navbar.propTypes = propTypes;
80

Callers

nothing calls this directly

Calls 2

mapToCssModulesFunction · 0.90
getExpandClassFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…